Value doesnt wanna update?
Im currently making a power based game and i have trouble with one thing, that is that the TotalPower doesnt wanna update.
My code:
01 | local TargetPart = script.Parent.Parent.TargetPart |
03 | script.Parent.Touched:Connect( function (hit) |
04 | if hit.Parent:FindFirstChild( "Humanoid" ) then |
05 | local player = game.Players:GetPlayerFromCharacter(hit.Parent) |
06 | local stats = player.Stats |
07 | local TP = player.ExtraData.TotalPower |
08 | local HumRP = player.Character.HumanoidRootPart |
10 | if TP.Value > = 1 e+ 12 then |
11 | HumRP.CFrame = TargetPart.CFrame |
Things i've tried:
Print debugging (Keeps saying TP is 0)
Manually going to the path