Hello, I am trying to make a group only regen button, but for some reason when I click it the regen doesn't work. I'm so confused and is anyone here seeing something I'm not? Thank you for reading
location = script.Parent.Parent.Parent
regen = script.Parent.Parent
save = regen:clone()
if player:IsInGroup (5310591) then
regen:remove()
local back = save:clone()
back.Parent = location
back:MakeJoints()
end
script.Parent.ClickDetector.MouseClick:Connect(function (player)

3 comments
hello, are you able to post the rest of the script beyond line 11?
Please post the entire script, as "player" is not defined. This question isn't really solvable unless we can see the script.
@NickyPlayz2011 Ok