So I want to make a safe guard so only the owner of the tycoon can reset the values but it seems like buttons can’t retrieve player info? Any way I can do this
reset.MouseButton1Click:Connect(function(player)
if player.UserId == tycoon:GetAttribute("UserId") then
fluidJumppower.Value = 0
stability.Value = 0
end
Assuming its a local script, we can get the local player:
reset.MouseButton1Click:Connect(function()
if game.Players.LocalPlayer.UserId == tycoon:GetAttribute("UserId") then
fluidJumppower.Value = 0
stability.Value = 0
end
end)
function(player), roblox doesn’t give the player in a Object they clicked on the client.