So this is my script and I'm very new to coding and don't know what to do

local part = game.Workspace.strengthpart
part.Touched:Connect(function(hit)
	local player = game.Players:GetPlayerFromCharacter(hit.Parent)
	local strength = player.leaderstats.strength.Value 
	local amount = 10
	local timeremove = 3
	strength = strength + amount
	wait(timeremove)
	strength = strength - amount
end)

and it the error it returns with is Workspace.strengthpart.Script:4: attempt to index nil with 'leaderstats' and no this isnt my script

1 comment

0

Can u give me the script that u use to make "strength" Value?I think the problem is in that script