This Script is Supposted to make my part give me (Or other player) powers. But when i run through it, i stay the normal speed and jump height.
--Variables
local PowerUp = script.Parent
local SpeedUp = PowerUp.SpeedUpAmount.Value
local JumpPower = PowerUp.JumpPowerAmount.Value
local Duration = PowerUp.Duration.Value
local CanTouch = true
--Function script:
local function GivePowers(part)
local hum = part.Parent:FindFirstChild("Humaniod")
if hum and CanTouch then
CanTouch = false
local OriginalWalkSpeed = hum.WalkSpeed
local OriginalJumpPower = hum.JumpPower
hum.WalkSpeed = SpeedUp
hum.JumpPower = JumpPower
PowerUp.Transparency = 1.0
wait(Duration)
PowerUp.Transparency = 0.0
hum.WalkSpeed = OriginalWalkSpeed
hum.JumpPower = OriginalJumpPower
CanTouch = true
end
end
PowerUp.Touched:Connect(GivePowers)

4 comments
Does it print out any errors?
humaniod
u spelled humanoid wrong
Thanks so much!