Hi,
I have a server script that clones a local script into starter gui. Once it is cloned I want it to start running. The server script says name:clone, when I play, I see it cloned from server storage into starter gui. The first line in this local script is
print("Working")
but it never prints. Anyone know how I can fix this?
U Should set the Local Script.Disabled to true in his properties and then set it to false after cloning it. So in that way the script will only start runing after being cloned.
This is a good idea. I have tried to fix this with
if humanoid then
local player = game:GetService("Players"):GetPlayerFromCharacter(humanoid.Parent)
print(player) --prints my name
local pla = up:WaitForChild("Pla") --up is the name of the model
pla.Value = player
local specialty = game.ServerStorage.NewLocal:Clone()
specialty.Parent = game.Players.player.PlayerGui
However I get the error player is not a valid member of Players “Players”. How I can fix this?
“player” is a variable. I’m assuming you tried to find it in the Players service. Using game.Players.player would mean asking the Players service to find an instance called “player” in it.
In your code “player” is equal to the player you’re trying to find, which in this case is the player you want to clone the LocalScript into.