Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I need help with my transformation local script?

Asked by 6 years ago
Edited 6 years ago

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)




1 answer

Log in to vote
0
Answered by
INOOBE_YT 387 Moderation Voter
6 years ago

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.

0
Wow thanks i cant believe i didnt remember that Ssj4Gokhan10 14 — 6y
Ad

Answer this question