So I made a SurfaceGui and I want to make it so the TextButton can only be clicked by me. How would I do that?
local part = Instance.new("Part", workspace)
part.Size = Vector3.new(50,50,4)
local screen = Instance.new("SurfaceGui", part)
local frame = Instance.new("Frame", screen)
frame.Size = UDim2.new(1,0,1,0)
frame.Style = "DropShadow"
wait(-.1000)
local button = Instance.new("TextButton", screen)
button.Size = UDim2.new(.5,0,.5,0)
button.Position = UDim2.new(.25,0,.25,0)
button.Style = "RobloxRoundButton"
button.MouseButton1Down:connect(function()
print "Clicked!"
--But how do I make it so only I Can click it and not other players?
end)
Thanks.

2 comments
I get this error "20:58:39.643 - LocalScript is not a valid member of Players" Did you mean LocalPlayer?
Oh yeah, oops, yeah it is LocalPlayer