Trails Cloning error!

image

On this line I get an Error Saying “attempt to index nil with clone”
I’ve tried changing it to WaitForChild and that didn’t work either so I’m not sure what to do.

Any help will be appreciated!

Are you sure that the object you are cloning is inside a folder before trying to clone it?

2 Likes

Yeah, pretty sure, I have a loading screen which takes 10 seconds to allow everything to load in.

Does ‘rs’ mean ReplicatedStorage in variable?

Yeah. I made the variable because before I had it set to game.ReplicatedStorage.Trails… and I thought
maybe making a variable might do something.

Can you check if trail you are looking for is really inside ‘Trails’ folder at the time of cloning since I just made a same thing and it worked for me in my studio normally. I mean inside of explorer at the time when you click play inside studio also check if the string ‘trail’ is a string you are looking for. This error occurs when the instance you are looking for inside specific location is not found at the time of cloning this includes incorrect name of instance.

I load in and It shows it in the Trails folder on both server and client.

Yeah but is instance inside this folder, you are looking for?

Yeah

(30 Charssssssssssssssssss)

Then the string might be the problem. Incorrect name of instance sent through remote event.

image

This is what I have for the FireServer.

The text name is the same as the the trails name.

At the end of trail variable add .Name as well and try again.

local trail = trails[name.TextLabel.Name].Name

Theres an error, with trails[name.TextLabel.Name].Name and trails[name.TextLabel].Name

image

Reverse code back you had and try to print trail variable and if it is nil then that might be the problem.

Yeah, just tested it out and there was a nil

What did you pass from the client tho

So where I wrote trails[name.TextLabel.Name] I changed it to trails[name.TextLabel.Text] because I wanted to find out the text because that what the name of the trail is but I still get a nil output

I passed player, trail

Remove the player argument and see if it works

It is automatically provided by roblox so no need to do so

Still get a nil output after taking player out and just having trail

I want to see your client code and what type of instances it is parented too