so Ive got a brick, when you click it a Gui from StarterGui is supposed to Pop up which holds a bunch of buttons that does stuff, problem is the only way i know how to do this only works in studio.
This is my script
its a local script
local Dice = game.Players.LocalPlayer.PlayerGui.Roller.Window function onTouched(clicked) Dice.Visible = true end script.Parent.ClickDetector.MouseClick:connect(onTouched)
Any help on how to rewrite this line to work in a live game?
LocalPlayer can only be called in a localscript INSIDE the player, use this instead:
function onTouched(Player) local Dice = Player.PlayerGui.Roller.Window Dice.Visible = true end script.Parent.ClickDetector.MouseClick:connect(onTouched)