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

How fix the walkspeed of the character?

Asked by 3 years ago
Edited 3 years ago

So I was making a luck based game, y'know, the norm, then i am trying to make the walkspeed 16 again, but the computer doesn't know what the humanoid is (and i know why) if that was a mouthful, you will see what i mean

local Hitable = false

script.Parent.Touched:Connect(function(hit)
    if Hitable == false then
        local humanoid = hit.Parent:findFirstChild("Humanoid")
        if humanoid~=nil then
            Hitable = true
            wait(.5)
            humanoid.WalkSpeed = 0
            local Number = math.random(1,2)
            print(Number)
            if Number == 1 then
                humanoid.Health = 0
            end
        end 
    end 
end)
1
What do you mean by the computer doesn't know what the humanoid is? Also are there any errors in the output JustinWe12 723 — 3y
0
what are the errors in the ouput if there are none i would use a print function to find the errors manually Guest_player1689 2 — 3y

Answer this question