Hey there,
I have this peice of code:
function openChest()
print("Clicked on handle.")
if not debounce then
debounce = true
if Chest.Open.Value then
rotate(Lid, increment)
else
rotate(Lid, -increment)
end
Chest.Open.Value = not Chest.Open.Value
debounce = false
else
end
end
Lid.ClickDetector.MouseClick:Connect(openChest)
The code works fine, but I want to take the player who clicked on it and change some of its stats when this happened. How would I get the player in this script?
Thank you for helping. If you need any more information, just let me know.