When i tried to add health, maxhealth, walkspeed and jumppower, it wont work how do i fix this or is there any way for me to change the players health, max health jumppower and walkspeed then revert it back to before it was changed?
Tool = script.Parent player = script.Parent.Parent.Parent local mouse = player:GetMouse() Tool.Equipped:Connect(function(mouse) print("it works") wait() mouse.Button1Down:Connect(function() game.Lighting["UpperTorsoParticle1"]:clone().Parent = Tool.Parent.UpperTorso game.Lighting ["UpperTorsoParticle2"]:clone().Parent = Tool.Parent.UpperTorso game.Lighting ["LowerTorsoParticle1"]:clone().Parent = Tool.Parent.LowerTorso Tool.Parent.Humanoid.Health + 150 Tool.Parent.Humanoid.MaxHealth + 150 Tool.Parent.Humanoid.JumpPower + 90 Tool.Parent.Humanoid.WalkSpeed + 50 print('on') end) end)
You need to do:
Tool.Parent.Humanoid.Health = Tool.Parent.Humanoid.MaxHealth + 150 Tool.Parent.Humanoid.MaxHealth = Tool.Parent.Humanoid.MaxHealth + 150 Tool.Parent.Humanoid.JumpPower = Tool.Parent.Humanoid.MaxHealth + 90 Tool.Parent.Humanoid.WalkSpeed =Tool.Parent.Humanoid.MaxHealth + 50
This gives ROBLOX a value to perform arithmetics on and equal signs are also needed.