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)
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)