So basically I am trying to locate something using an instance converter.
That’s probably not what it’s called but it’s the best I could think of.
game.Workspace[v].CanCollide = true
How would I be able to use WaitForChild on the brackets? (Or as I like to call it, an instance converter)
game.Workspace:WaitForChild([v]).CanCollide = true
1 Like
Do you mean:
workspace:WaitForChild(v.Name).CanCollide = true
?
Or if that doesn’t work use a repeat loop
repeat task.wait(0.01) until v.Parent == workspace;
3 Likes
Nah, I tried that and it just broke the whole script without returning any errors
Edit: Wait maybe it did return an error. I was looking at the client and not the server. Lemme try again.
What even is v
? Is it a part in a loop?
Yeah, v is from a for loop. and I’m trying to locate it as an instance.
Oh, then may I ask to see the whole for loop?
The for loop is a giant script that has multiple other scripts in it unrelated to this topic. The V value is equal to the player. I just want to know how to locate it using “WaitForChild()”
edit: The topic I made I didn’t mean to reference V as a part sorry
sjr04
(uep)
August 19, 2021, 9:22pm
#8
Just remove the [] ? So it’s just (v), not ([v])
That doesn’t work, it will just read it as an instance and it won’t convert the value to a string.
sjr04
(uep)
August 19, 2021, 9:23pm
#10
Looks like I skipped the first reply, but this one is correct:
Oh you’re right it worked! I’m pretty sure before he edited it, it just said (v) but thanks guys.
Yeah i’m sorry, I forgot you cannot wait for an instance itself so I fixed it immediately after.