Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to parent the player to replicatedstorage?

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

3 comments

1

Why are you doing that?

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.

0

I know kids are crazy, but this lol?

1 answer

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

2 comments

0

doesent work

0

try adding a wait() before moving character, if works please mark as answered :>

This discussion is preserved as it was. New answers, comments, and votes are closed.