script.Parent.Touched(function(part)
local h = part.Parent.Humanoid
if h ~= nil then
h.WalkSpeed = 45
end
end)
I think I just did a careless mistake. But nothing is showing up in the Output.
script.Parent.Touched(function(part)
local h = part.Parent.Humanoid
if h ~= nil then
h.WalkSpeed = 45
end
end)
I think I just did a careless mistake. But nothing is showing up in the Output.
You missed the calling the connect method on the Touched event:
script.Parent.Touched:connect(function(part)
local h = part.Parent:FindFirstChild("Humanoid") --also use FindFirstChild
if h then --"if h" is the same as "if h ~= nil"
h.WalkSpeed = 45
end
end)
Wow I feel stupid, especially since I made the same mistake yesterday...
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
Please don't edit your titles to say "[Closed]" in them. When they actually get locked that's done automatically