Need help with changing values

You can write your topic however you want, but you need to answer these questions:

  1. Goal: Make a script that detects when a proximity prompt is Triggered then change the leaderstats value to 1.
    Leaderstat value being “IsClothed”

  2. The issue: image

  3. What solutions have I tried so far: So far I’ve looked at tutorials and other examples of this code and cannot find the solution to this error. Developer forums has not been too useful either.

Script location: image

script.Parent.ProximityPrompt.Triggered:Connect(function(player)
	local player = game.Players.LocalPlayer.leaderstats
	if player.IsClothed.Value == 0 then
		player.IsClothed.Value += 1
	elseif player.IsClothed.Value == 1 then
		player.IsClothed.Value = 1
	end
end)
script.Parent.ProximityPrompt.Triggered:Connect(function(player)
	local leaderstats = player:WaitForChild("leaderstats")
	if leaderstats.IsClothed.Value == 0 then
		leaderstats.IsClothed.Value += 1
	elseif leaderstats.IsClothed.Value == 1 then
		leaderstats.IsClothed.Value = 1
	end
end)

Try this