Hi, there. I’m trying to make a register with a button, which button when you click it, it claims the register and displays on it who claimed it.
The main issue I’ve encountered is not being able to display on it who has claimed it (the username of the player), using a server script.
I’ve tried changing the parent for Player, but that didn’t seem to work.
Here’s the main script:
local Claimed = false
function ClaimRegister(Player)
if Claimed == false then
Claimed = true
script.Parent.Display.ClaimButton.Text = "Unclaim"
script.Parent.Display.TextLabel.Text = "Claimed by "..Player.Name
wait(1)
elseif Claimed == true then
Claimed = false
script.Parent.Display.ClaimButton.Text = "Claim"
script.Parent.Display.TextLabel.Text = "Claim"
end
end
script.Parent.Display.ClaimButton.MouseButton1Down:Connect(ClaimRegister)
I don’t have much knowledge about scripting. I can mainly do basic tasks.
The error I’m receiving:
Actually, I tried doing it with a ClickDetector since it’s a server script and it’s supposed to be, which worked for me instead! Thanks for the advice anyway.