Im trying to get the players username when they click a surfaceGUI textButton in a server script.
My code: ** FIXED MYSELF **
local button = script.Parent
local inUse = game.Workspace.Booth1:WaitForChild("InUse")
local Owner = game.Workspace.Booth1:WaitForChild("Owner")
button.MouseButton1Click:Connect(function()
if inUse.Value == false then
inUse.Value = true
Owner.Value = ("Players username")
-- players username here ^^^^^^^^^^^
print("Claimed!")
else
print("Already being used!")
end
end)
