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

what's the best way to make a character variable?

Asked by 7 years ago

I tried this in my script:

local player = game.Players.LocalPlayer

local character = player.Character

if character then 
    print("character added")
end

and before that I tried:

local player = game.Players.LocalPlayer

player.CharacterAdded:Connect(function(character)
    print("character added")
end)

but it both didn't print it out

both scripts were inside of a local script

the local script is inside of a part that is in replicated storage and the part is then cloned and moved to workspace after some time

0
If an item is in replicated storage and if it has a script i swear it will not run the script greatneil80 2647 — 7y
0
well I tried inserting a script into the item by another script when the item is in workspace and it still doesn't work g1o2r3d4a5n6 350 — 7y
0
Localscript should be in startergui or starterplayerscripts or startercharacterscripts Vulkarin 581 — 7y

Answer this question