#trail trouble (title tuff)

1 messages · Page 1 of 1 (latest)

jolly bridge
#

i think im going abt this wrong, i wanna make it so that when the script gets an event, it clones a particle w a part and has it follow the player around, and when it gets the 2nd event it getrs destroyed. it wont spawn the clone ```lua
local event = game.ReplicatedStorage:WaitForChild("flashsteps")
local character = script.Parent.Parent
local humanoid = character:WaitForChild("Humanoid")
local torso = character:WaitForChild("Torso")
local event2 = game.ReplicatedStorage:WaitForChild("flashstepsOFF")

local rs = game.ReplicatedStorage

local flashstepping = false

local uis = game:GetService("UserInputService")

game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
local flashstep = rs.vfx.FLASHSTEP:Clone()
flashstep.Parent = game.ServerStorage.flashsteps
event.OnServerEvent:Connect(function(player)
flashstepping = true
flashstep.Parent = torso
while true do
flashstep.CFrame = torso.CFrame
end
end)
event2.OnServerEvent:Connect(function(player)
flashstep:Destroy()
end)
end)
end)

i been trynna do this for the past 3 days
jolly bridge
#

or the one that js says "script"

void spear
#

so why are u getting local player

jolly bridge
#

thats old idk why im getting it

#

hol on lemme fix it

void spear
#

just wondering what is flashstep

#

is it a part

jolly bridge
#

yeah

#

its the part im cloning

void spear
#

ur cloning it in server storage tho

#

is it even visible in server storage

#

shouldn’t it be in workspace

jolly bridge
#

didnt know that

#

lemme see

void spear
#

I’m not sure tho

jolly bridge
#

nah even if it the parent is to workspace it still wont clone

#

or show

void spear
#

but check

jolly bridge
#

i did

void spear
#

if part is in server storage

#

it is not there right

jolly bridge
#

oh the part

void spear
#

?

jolly bridge
#

nah the part is in replicated

void spear
#

bro

#

When you clone the flashstep

#

You parent it to server storage

#

wait no

#

u change after

jolly bridge
#

yeah

void spear
#

do u have anything in output

lost flint
lost flint
void spear
#

they don’t use it

thorny parcelBOT
#

studio** You are now Level 12! **studio

lost flint
void spear
#

I’m not sure

#

Also maybe try use humanoid root part

#

Instead of torso

lost flint
void spear
#

I’m assuming there aren’t any errors in output but could be, op hasn’t said

lost flint
#

*upper and lower torso

#

@jolly bridge could you send over output?

jolly bridge
#

there arent any errors with the script it js wont work from what i see

lost flint
# jolly bridge

hm. could you place print statements under each open section?

jolly bridge
#

aight

lost flint
#
local event = game.ReplicatedStorage:WaitForChild("flashsteps")
local character = script.Parent.Parent
local humanoid = character:WaitForChild("Humanoid")
local hrp = character:WaitForChild("HumanoidRootPart")
local event2 = game.ReplicatedStorage:WaitForChild("flashstepsOFF")

local rs = game.ReplicatedStorage

local flashstepping = false

print("init successful")

game.Players.PlayerAdded:Connect(function(plr)
    print("player added")
    plr.CharacterAdded:Connect(function(char)
        print("character added"_
        local flashstep = rs.vfx.FLASHSTEP:Clone()
        flashstep.Parent = game.ServerStorage.flashsteps
        print("flash step init")
        event.OnServerEvent:Connect(function(player)
            print("Event fired")
            flashstepping = true
            flashstep.Parent = torso
            while true do
                flashstep.CFrame = hrp.CFrame
                task.wait()
            end
            print("While statement broke")
        end)
        event2.OnServerEvent:Connect(function(player)
            flashstep:Destroy()
            print("Flashstep destroyed")
        end)
    end)
end)

@jolly bridge use this and send over output please.

jolly bridge
#

i was finna tell u it didnt send any prints

lost flint
jolly bridge
lost flint
#

where is your script located?

#

actually no thats irrelavant

#

are you sure the player is loading?

jolly bridge
lost flint
#

is your avatar visible

jolly bridge
#

yeah

#

eveything is loaded

lost flint
#

disable the "windcontroller" script

#

then play again

jolly bridge
#

aight

#

output looks good but it still wont work

lost flint
#

could you, perhaps, move the script to SSS

jolly bridge
lost flint
#

i think i get whats wrong

#

youre placing the script in startercharacterscripts

#

the problem is the script will only run AFTER the character loads

#

we need it to run before the character loads

#

hence SSS is the best place to put it

jolly bridge
#

ah

#

hold on i gotta re define stuff

lost flint
#
local event = game.ReplicatedStorage:WaitForChild("flashsteps")
local event2 = game.ReplicatedStorage:WaitForChild("flashstepsOFF")

local rs = game.ReplicatedStorage

local flashstepping = false

print("init successful")

game.Players.PlayerAdded:Connect(function(plr)
    print("player added")
    plr.CharacterAdded:Connect(function(character)
      local humanoid = character:WaitForChild("Humanoid")
      local hrp = character:WaitForChild("HumanoidRootPart")
        print("character added"_
        local flashstep = rs.vfx.FLASHSTEP:Clone()
        flashstep.Parent = game.ServerStorage.flashsteps
        print("flash step init")
        event.OnServerEvent:Connect(function(player)
            print("Event fired")
            flashstepping = true
            flashstep.Parent = torso
            while true do
                flashstep.CFrame = hrp.CFrame
                task.wait()
            end
            print("While statement broke")
        end)
        event2.OnServerEvent:Connect(function(player)
            flashstep:Destroy()
            print("Flashstep destroyed")
        end)
    end)
end)
#

use this

#

its redefined

#

and uses HRP too! this means both R6 and R15 will work

jolly bridge
#

word

lost flint
jolly bridge
lost flint
#

does it work, is there a new error?

lost flint
jolly bridge
#

no errors and everything prints but it wont clone

lost flint
#
            flashstep.Parent = torso
            while true do
                flashstep.CFrame = hrp.CFrame
                task.wait()
            end
#

change "torso" to "hrp"

jolly bridge
#

alr

#

hrp means humanoid rootpart right?

lost flint
jolly bridge
#

it works

#

ty bro

lost flint
jolly bridge
#

i been stuck on it for days

lost flint
jolly bridge
#

wait

lost flint
jolly bridge
#

but it says smth locked?

lost flint
# jolly bridge

yes, im pretty sure its because you are running an indefinite loop

jolly bridge
#

oh yeah

lost flint
#
            while true do
                flashstep.CFrame = hrp.CFrame
                task.wait()
            end
#

even after flashstep is being destroyed the game tries to change its cframe

void spear
void spear
#

ah yeah