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

Script not working...help?

Asked by 10 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

This is a speed pickup. Basically, it changes your maximum walkspeed by 34, but, it doesn't do anything. It just continues to float. Any ideas?

print'Script - Working'
local Pack = script.Parent
Pack.Handle.BodyPosition.position = Pack.Handle.Position
Pack.Handle.Anchored = false
Took = false
script.Parent.Handle.Touched:connect(function(hit)
    if hit.Parent then
        local Patient = hit.Parent:findFirstChild("Humanoid")
        if Patient then
            if Patient.Walkspeed then
                if not Took then
                    Took = true
                    Patient.Walkspeed = Patient.Walkspeed + 34
                    Pack.Parent = nil
                    wait(15)
                    Pack.Parent = Workspace
                    wait(1)
                    Took = false
                end
            end
        end
    end
end)
0
Are you asking for the Handle to disappear when someone "takes" it? That isn't in this code, it only modified the WalkSpeed. adark 5487 — 10y
0
Yes. When someone takes it, I'd like it to disappear. But, for it to return 60 seconds (or a minute) later. TheRings0fSaturn 28 — 10y

1 answer

Log in to vote
0
Answered by
adark 5487 Badge of Merit Moderation Voter Community Moderator
10 years ago

Capitalize the 'S' in the two WalkSpeeds on line 13 of that code.

Ad

Answer this question