Make Player Run when tool equipped

0

If you have a tool named "Shield" in StarterPack

StarterPack/Shield/Script
local tool = script.Parent

local lastCharacter = nil

local function onEquipped()
    local character = tool.Parent
    character.Humanoid.WalkSpeed = 32

    lastCharacter = character
end
tool.Equipped:connect(onEquipped)

local function onUnequipped()
    local character = tool.Parent
    lastCharacter.Humanoid.WalkSpeed = 16
end
tool.Unequipped:connect(onUnequipped)

  • 0 posts
  • 0 subtopics
  • almost 2 years ago by vince