Now usually if I just were to put StarterCharacter with everything inside, it would work. Now, the code above does not error and it does insert all the ship parts inside of the ship model that I have in RS into it, but the player does not get copied into the game.įirst image is before I start the game, and second image is after I start the game. Player.CharacterAdded:Connect(onCharachterAdded) RootPart:SetNetworkOwner(game.Players:GetPlayerFromCharacter(character)) While not rootPart:IsDescendantOf(workspace) do Local rootPart = character:WaitForChild("HumanoidRootPart") Local function onCharachterAdded(character) inserting every model part inside of StarterCharacterįor i, v in pairs(newship.Model:GetChildren())do Local character = user.Character or user.CharacterAdded:Wait() Local shipInventory = require(replicatedStorage:WaitForChild("shipInventory")) Local replicatedStorage = game:GetService("ReplicatedStorage") this is where I hold the information for each ship model Local newPlayer = ship:newPlayerShip(user) Local ship = require(script.Parent:WaitForChild("shipObject")) Local character = player.Character or player.CharacterAdded:Wait() I am doing it the exact same way as before, but It doesn’t seem to work for some reason. I already made a system to replace the current character (just putting a model called StarterCharacter inside of PlayerScripts and it automatically overrides the default) but now i’m trying to make my game more oop and make the character an object that I can easily swap out parts for. I’m having some trouble with creating a custom character for my game.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |