Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-2

How to parent the player to replicatedstorage?

Asked by 5 years ago

For my FPS i am parenting the player to replicatedstorage on the server when the player joins but what can i do after the player respawns.

here is the code

game.Players.PlayerAdded:Connect(function(plr)
Player.CharacterAdded:connect(function(character)
Player.CharacterAppearanceLoaded:Connect(function(char) 
char.Parent = game.ReplicatedStorage 
end)
end)

Thank you in advance all help is appreciated

1
Why are you doing that? pidgey 548 — 5y
0
Im making an fps too, its so you have a menu.Because when ur in the menu,if you walk and fall off you die and ita a bug. And its easier to just move player instead of setting walkspeed and jumppower. CommanderCaubunsia 126 — 5y
0
I know kids are crazy, but this lol? kittonlover101 201 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

Im making an fps too, its so you have a menu.Because when ur in the menu,if you walk and fall off you die and ita a bug. And its easier to just move player instead of setting walkspeed and jumppower. Now- first, move it to lighting not replicated! Its recomended, and second. If oyu really want to move player to repplicatedwhatever, do this

game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:connect(function(character)
--plr.CharacterAppearanceLoaded:Connect(function(char) --but you dont need this i think
character.Parent = game.ReplicatedStorage --or game.Lighting
end)
end)

your problem wa your variable was plr but you did player.CharacterAdded XD

0
doesent work fortune80 -4 — 5y
0
try adding a wait() before moving character, if works please mark as answered :> CommanderCaubunsia 126 — 4y
Ad

Answer this question