Here's the code:
Cooldown = 1
CTorso = game.Players.LocalPlayer.Character.Torso
function onKeyPress(inputObject, gameProcessedEvent)
if inputObject.KeyCode == Enum.KeyCode.T then
if game.Players.LocalPlayer.leaderstats.Level > 3 then
TorsoParticles = Instance.new("Particle Emitter", CTorso)
TorsoParticles.Color = ColorSequence.new(Color3.fromRGB(255, 70, 14))
TorsoParticles.Lifetime = NumberRange.new(0.1, 0.5)
TorsoParticles.Size = NumberSequence.new(5)
TorsoParticles.LockedToPart = true
TorsoParticles.Speed = NumberRange.new(5)
TorsoParticles.Rate = 20
else
print("Wrong Level")
end
end
end
game:GetService("UserInputService").InputBegan:connect(onKeyPress)
Error:
Pyro Moves:40: attempt to compare number with userdata
