Ad
Log in to vote
0

How would I put a script in a player?

Asked by 7 years ago

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

Log in to vote
0
Answered by
Bebee2 195
7 years ago

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

Ad
Log in to vote
1
Answered by 7 years ago

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)
0
Yes. Roboy5857 20 — 7y
0
Edited my post. Grenaderade 525 — 7y

Answer this question