#player not speeding up

1 messages · Page 1 of 1 (latest)

deft wolf
#

so im making a function where it speeds up players but doesnt work, like the player's walkspeed is same

    print("Event: Speed Up Players")
    
    for _, plr in ipairs(PLRS:GetPlayers()) do
        local char = plr.Character
        if char then
            local hum = char:WaitForChild("Humanoid")
            hum.WalkSpeed = BASE_WALKSPEED * SPEED_MULTIPLIER    
        end 
    end
end```
deft wolf
#

what

#

like its being called cus it prints

#

this ("Event: Speed Up Players"

#

but doesnt rlly change the speed

forest crag
#

is it called by a LocalScript? whoknows

deft wolf
#

so like uh module here

function EventsModule.RunRandomEvent()
local events = {
--EventsModule.RainOfParts,
--EventsModule.ShrinkPlayers,
--EventsModule.InvisAll,
EventsModule.SpeedPlayers,
}

local chosenEvent = events[math.random(1, #events)]

chosenEvent()

end

then in server

    EventsModule.RunRandomEvent()
forest crag
#

any errors in the output?

deft wolf
#

nothing

#

it just prints Event: Speed Up Players"

#

wait a damn minute

#

bruh

#

i solved it

#

my sprint is over running it

#

or smth idk what its called

forest crag
deft wolf
prisma pumice
#

@deft wolf

#

Why ipairs ?

#

Try the script after removing ipairs

forest crag
prisma pumice
#

If it’s already fixed you should mark the post as solved

forest crag
#

GetPlayers returns an array

prisma pumice
#

Cool

deft wolf