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

I used the Remote Event, but it did not work, can anyone check if I wrote it correct?

Gui local script

script.Parent.MouseButton1Click:Connect(function()
	game.ReplicatedStorage.RemoteEvent:FireServer()
end)

script

game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function()
	-- Any code in here will run when RemoteEvent is triggered
	script.Parent.MouseButton1Click:connect(function()
    game.StarterGui.Teleport.Frame.Visible = true
end)
end)

1 comment

0

Is FE enabled

2 answers

✓ Accepted answer

As seith14 said, place the LocalScript inside the TextButton that is in your StarterGui. Instead of using game.Players try using script.Parent.

script.Parent.MouseButton1Click:Connect(function() --This is where your TextButton is.
    script.Parent.Frame.Visible = true  --This is where your frame is.
end)

Use more Connect with "C" because with "c" this is obsoleto.

Try to check the locations to see if they are correct and please put the error the next time you read the post, thanks!

You don't need a remoteevent for this because it doesn't need to access the server. Make sure you have this in a LocalScript

script.Parent.MouseButton1Click:connect(function()
    game.Players.LocalPlayer.PlayerGui.Teleport.Frame.Visible = true
end)

1 comment

0

ummm does not seem to be working

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