Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to have flames coming from the player's feet only when running?

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

3 answers

✓ Accepted answer

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

3 comments

0

I'll get it to work, thanks :)

0

Worked like a charm, thanks very much man!

0

No problem!

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()

2 comments

0

This is not a solution.

0

What is the solution? :D

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

1 comment

0

Yeah I did that in my actual script... I just typed the example above for the sake of SH. How do I get it so the fire doesn't display when the player stops moving but displays when I'm running

This discussion is preserved as it was. New answers, comments, and votes are closed.