so what i mean by that is instead of doing
game.Workspace.Partignore
i want to do "
"Partignore"
is that possible when choosing what the ray ignores by name?
so what i mean by that is instead of doing
game.Workspace.Partignore
i want to do "
"Partignore"
is that possible when choosing what the ray ignores by name?
You Simply Can't.™
Think of it like this, you want to ignore string "Part", but which part? Where does it search?? Lua doesn't know which part, it's too ambiguous. It has to be a table to clear ambiguity, it needs direct references.
Yes pretty simple, though i'm not sure what you mean by ray, but this would ignore any parts touching the beam. You are going to want to use a table
PartsToIgnore = {"Partignore", "MyOtherPart"}
for i, v in pairs(script.Parent:GetTouchingParts) do
Ignored = false
for j, w in pairs(PartsToIgnore) do
if PartToIgnore == v.Name then
Ignored = true
end
end
if Ignored == false then
--Code for the beam.
end
end
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
i have an idea for ignoring the hands i will put the hands in a folder named ignore then a for loop adding them to the ignore list
wait i remembered that the hands were created in a local script and it happens in a server script so looks like i won't need to ignore it after all