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

Changing the players walking noise, doesn't work?

Asked by 5 years ago

Yea, so i wanted to make a dimension that changes your walkspeed and the walking noise. But anyways, roblox was entirely idiotic and threw up and error.

script.Parent.Touched:Connect(function(player)  
wait(1)
script.Parent.Running:Clone().Parent = player.Character.Head
    end)

19:53:28.952 - Character is not a valid member of Part --totallywindowsxp

Now, you may ask "Oh, this questions dumb TIEM T0 REMOVV", honestly it doesn't work, locals don't work so i had to ask this.

0
Touched doesn't return the player it returns the part that collided with it hellmatic 1523 — 5y

1 answer

Log in to vote
1
Answered by
hellmatic 1523 Moderation Voter
5 years ago

Touched doesn't return the player it returns the part that collided with it

script.Parent.Touched:Connect(function(hit)  
    if hit then 
        if game.Players:FindFirstChild(hit.Parent.Name) then 
            locla character = hit.Parent
            local player = game.Players:GetPlayerFromCharacter(character)
            wait(1)
            script.Parent.Running:Clone().Parent = player.Character.Head -- or character.Head
        end
    end
end)

0
I'm 3 hours late on this, but at line 4 you said locla and not local. RibgyTheRacoon 67 — 5y
Ad

Answer this question