so i dont even think the wait decides to happen because i tried waiting 25 seconds and the print after that didnt aappear but the one before thhe wait does... also these operators do mean that the valua is **more than **the specified number, righty? sorry about the bad grammar soethingf alergic to stung mu hand and i cant typ e well lol help is VERY muchj appreciated =)!
EDIT: i think the prboelm is my if statement but im not sure i just had to fix the title because of admin note ;P
enabled = true
function onDamage(Part)
if Part.Parent:FindFirstChild("Humanoid") ~= nil and Part.Parent.Name ~= "script.Parent.Name" then
if enabled == true then
enabled = false
print("Process started")
StealerName = script.Parent.Parent.Name
BeingStolen = Part.Parent.Name
BS = workspace:FindFirstChild(BeingStolen)
SN = workspace:FindFirstChild(StealerName)
print("Variables successfully defined")
if game.Players[BeingStolen].leaderstat.Level.Value > 59 and game.Players[StealerName].leaderstat.Level.Value > 59 and game.Players[BeingStolen].leaderstat.SpecAbility.Value == 1 and game.Players[StealerName].leaderstat.SpecAbility.Value == 1 then
SN.Torso.Anchored = true
BS.Torso.Anchored = true
x = Instance.new("BoolValue")
x.Name = "Process"
x.Parent = SN
print("Process value inserted into the player model of SN. Waiting 25 seconds...")
wait(25)
print("25 seconds waiting, processing outcome.")
if BS and SN and BS.Humanoid.Health > 0 and SN.Humanoid.Health > 0 and SN:FindFirstChild("Process") then
print("Outcome successful, working on changing values.")
--if SN:FindFirstChild("Process") then
game.Players[BeingStolen].leaderstat.Level.Value = 1
game.Players[BeingStolen].leaderstat.EXP.Value = 60
game.Players[BeingStolen].leaderstat.SpecAbility.Value = -999 --meant to be nothing
Part.Parent.Humanoid.Health = 0
game.Players[StealerName].leaderstat.SpecAbility.Value = -2
print("Values chaged, respawning attacker and victim.")
SN.Humanoid.Health = 0
BS.Humanoid.Health = 0
wait(2)
script.Parent:Destroy()
end
--end
end
end
end
print("Process ended")
end
script.Parent.Touched:connect(onDamage)

8 comments
two words: LUA BLOCK
Please format your code in lua code block.
Use a Code Block so we can read it
sorry, is my first time using this site, i edited it :)
Use leaderstats, http://wiki.roblox.com/index.php?title=Leaderboard.
it's leaderstat for a reason, don't mind that
Try removing the ~ in the line script.Parent.Name =~
It's because of the Part.Parent.Name ~= "script.Parent.Name" part. Remove the quotes.