Whenever I Click On This, It Doesn't Do Anything. It Runs On A Local Script, But Ive Tried Running It On A Normal Script But It Wont Work.
script.Parent.MouseButton1:Connect(function() game:GetService("TeleportService"):Teleport(game.Players.LocalPlayer,6317944962) end)
Also It Would Be Nice To Know If You Can Change The GUI To Not Be "Typeable" (Users Can Type And Change The Text)
You made 1 small error, you should be using MouseButton1Click or MouseButton1Down, and you dont need to call the player
script.Parent.MouseButton1Down:Connect(function() game:GetService("TeleportService"):Teleport(000000) -- your game id here end)
You have to fire a remote function from the local script. Make a remote event and store it in ReplicatedStorage.
--local script local remoteEvent = game.ReplicatedStorage.RemoteEvent script.Parent.MouseButton1:Connect(function() remoteEvent:FireServer(631794) --fire the script with the id as a parameter end) --server script local remoteEvent = game.ReplicatedStorage.RemoteEvent remoteEvent.OnServerEvent:Connect(function(plr, id) --receives player and id game:GetService("TeleportService"):Teleport(plr,6317944962) end)
Untested code, let me know if you run into any issues.