#for some reason im getting this error?
41 messages · Page 1 of 1 (latest)
if script.Parent.Parent.h1.Touched or script.Parent.Parent.h2.Touched or script.Parent.Parent.h3.Touched or script.Parent.Parent.h4.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") == false then return end
local plr = hit.Parent
if plr.Character then
if teleporting == false then
local cha = plr.Character
local d = false
for i = 1, #queue do
if queue[i] == cha.Name then
d = true
end
end
if d == false then
if #queue < ma then
table.insert(queue, cha.Name)
leave:FireClient(plr)
end
plr.CharacterRemoving:Connect(function(ch)
for i = 1, #queue do
if queue[i] == ch.Name then
table.remove(queue, i)
end
end
end)
end
end
end
end)
game.ReplicatedStorage.LeaveQueue.OnServerEvent:Connect(function(plr)
if plr.Character then
for i = 1, #queue do
if queue[i] == plr.Character.Name then
table.remove(queue, i)
end
end
end
end)
im getting this error message
Oml please use variables

It tells you what your missing
i cant tell where
yes but which one because i checked
?
this has no then statement
Touched is an event
ohh
It returns an event not a boolean
You connect to events to run code when something happens in your game
oh i get it
thatnks
thanks
i made the 4 parts into a union and deleted the if statement
i mean you could try grouping the parts into a folder and running a for i,v in pairs for each part
local _parts = {
[1]=script.Parent.Parent.h1;
[2]=script.Parent.Parent.h2;
[3]=script.Parent.Parent.h3;
[4]=script.Parent.Parent.h4;
}
for _,v in next,_parts do
v.Touched:connect(function(part)
-- do stuff here
print('touched by'.. tostring(part))
end)
end
could this be easier?
that would probably work too but i decided to make them into a union and delete the if statement
so its like
script.Parent.Parent.h1.Touched:Connect(function(hit)
unions sometimes have buggy collisions, if the union you made experiences it consider switching to his code
ok thanks
You'd just need to change the render fidelity right?
In the properties
Or wait no
I forget what its called 
Collision Fidelity duhh
sometimes it solves the issue, sometimes it doesnt