Hey,
So I have a drink which increases run speed once you drink it, and I'd like to have a fire blaze effect from their feet but only when they run and only for 10 seconds.
I've tried the following
local replicatedStorage = game:GetService("ReplicatedStorage") local flame = replicatedStorage.FireEmitter.Clone() -- click to drink fire.Parent = character.RightFoot
but it's always on, even when I'm not running, and it's only on one foot.
Thanks
local replicatedStorage = game:GetService("ReplicatedStorage") local rightFlame = replicatedStorage.FireEmitter.Clone() local leftFlame = replicatedStorage.FireEmitter.Clone()
-- click to drink rightFlame.Enabled=false leftFlame.Enabled=false rightFlame.Parent = character.RightFoot leftFlame.Parent=character.LeftFood
player.character.running:connect(function(speed) if speed==16 then rightFlame.Enabled=true leftFlame.Enabled=true else rightFlame.Enabled=false leftFlame.Enabled=false end end)
if you didn't just use a free model and you have any experience with scripting you should be able to edit this to work
The thing is that you have not "finished" your code. You did not tell the script to remove the fire. I guess you did declare the variable character. But if not, you need to do that.
local replicatedStorage = game:GetService("ReplicatedStorage") local flame = replicatedStorage.FireEmitter:Clone() -- click to drink fire.Parent = character.RightFoot wait(10) fire:Destroy()
The issue is that you did not specify Clone
correctly. It's supposed to be written as Object:Clone()
.
local replicatedStorage = game:GetService("ReplicatedStorage") local flame = replicatedStorage.FireEmitter:Clone() -- click to drink fire.Parent = character.RightFoot