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

How would I put a script in a player?

I have a script, and it only works if I put it inside the player. isn't it this?

local player = game.Players.LocalPlayer
script.Parent=player

I'm not very sure. Are does it need a script?

2 answers

✓ Accepted answer

A neat trick the majority of scripters I know placed their LocalScripts inside StarterGui so when the character spawns, they spawn with that script.

Well, if you want it to go to all players, put this:

player = game.Players.LocalPlayer
game.Players.PlayerAdded:connect(function()
	script.Parent:Clone().Parent = player
end)

2 comments

0

Yes.

0

Edited my post.

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