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

How do I move a script from one service to another service by using a script?

I have a script in the service Workspace. I want it to go to the service StarterGui after 5 seconds. I have made a script. I waited more than 5 seconds. To make sure, I used a 30 second timer, once I joined the game. I looked at my explorer. The script was still in the service Workspace. To make sure it was the right script, I looked in it and it still had the same code. Also, I looked in StarterGui and saw no script. So, the script that was "supposed" to move the script to the service StarterGui did not work.

Here is the code in the script that was "supposed to move the script to the service StarterGui:

wait(5)
game.Workspace.Camera.Parent = game.StarterGui --Camera is the script.

Please explain to me what I should do to fix this, or give me the code to fix this. Thank you.

1 answer

✓ Accepted answer

If you want to change to the guide that the player already has

you have to use this

--Change the camera name first

--Change the camera name first

game.Players.PlayerAdded:connect(function(plr)

local camera = game.Workspace.Camera2:Clone()

if plr.PlayerGui then
      camera.Parent = plr.PlayerGui
   end
end)

Now, go to players > you > PlayerGui and check if camera is on

3 comments

0

Camera is not in PlayerGui.

0

Change the camera Name

0

Thanks!

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