GUI Command Assistance

As per from my other recent post, I stopped with the idea of the teleportation command and thought GUI.

In other words, whenever you type !info a GUI on your screen pops up.

Same script, however I replaced

plr.Character.HumanoidRootPart.CFrame = CFrame.new(game.Workspace.Teleport.Position)

With this:

game.StarterGui.ScreenGui.Frame.Visible = true

And as the other error, the GUI doesn’t pop up.

Questions

Q: Script?
A: Normal Script, NOT localscript.

Q: Parent?
A: It’s in ServerScriptService

Q: Full Code?
A: Same thing from my other post “Teleport Command” although I replaced so and so with so and so, (said above)

Q: Errors?
A: No errors.

1 Like

You have to reference the UI through the player, not StarterGui.

I also recommend handling anything UI-related on the client, it will be much faster taking ping and whatnot into account.

So instead of so and so I should put?

Instead of

game.StarterGui.ScreenGui.Frame.Visible = true

Go through player.PlayerGui

Appreciate the help. Worked perfectly.

1 Like