So I have a tool with a local script inside of it that is supposed to make the player change speed, have a texture appear on their torso, and make it go back to normal after a few seconds have passed. The part with changing the characters speed is working fine but I can't seem to change the texture of the particle emitter. It just appears invisible when I test it ingame. Here's the script.
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local tool = script.Parent
local animation = script.Parent.DashMover
local Anim1
local Stexture = "rbxassetid://1532275639"
tool.Activated:Connect(function()
local Flare = Instance.new("ParticleEmitter")
Flare.Speed = NumberRange.new(0.5)
Flare.RotSpeed = NumberRange.new(100)
Flare.LockedToPart = false
Flare.SpreadAngle = Vector2.new(100, 100)
Flare.Texture = Stexture
Flare:Clone()
Flare.Parent = character.Torso
character.Humanoid.WalkSpeed = 300
character.Humanoid.JumpPower = 360
Anim1 = character:WaitForChild("Humanoid"):LoadAnimation(animation)
Anim1:Play()
wait(2)
character.Humanoid.WalkSpeed = 20
character.Humanoid.JumpPower = 50
end)
Ontop of this, when the player dies the entire script breaks! I would really appreciate someone answering my first problem and if you can get around to answering the second I would be ecstatic!
