#Duplication bug
48 messages · Page 1 of 1 (latest)
you’re trying to check a condition after you execute the action
move the already equipped condition to the top and add a return
or, just add a return in that condition at the bottom after the print
TouchPart.Touched:Connect(function(h)
if h.Parent:FindFirstChild('Humanoid') then
if (condition) then
return;
end
--pass
end
end)
no, you need to change the condition part to it checking if it is already equipped
if so; you return
return = stops running the rest of the function, basically returns the information the function provided and stops there
I get what return does but wym condition
condition = check to see if it already equipped
so your condition would be
if char.UpperTorso ~= nil then
i'm still trying to wrap my head around how that works but that would be your condition
well when I asked my friend he said thats what to do and it didnt work
because your condition is invalid, i mean you actually have to check if it is there, try this:
if char:FindFirstChild('Weld') then return end
also move
local chestweld = Instance.new('Weld')
into the main .touched signal
so this?
YAY
it works
now I can polish it up and boom I have my first class thanks man
😄
just do something like a boolean value at the start
local on = false
then at the start of equipping
if on == false then
script here
end
and at the end of the script
do on = true
thats the most simple way
even though this is already solved
solved but not really
so the visual duplication is fixed
but
It duplicates on the player
no visual but I think it might still be laggy
anyone knows what to do?
is it cloned form replicated storage
no actually
Idk for some reason I have it in the lighting folder
dont really remember why but it worked so I just left it there
maybe I should put it in replicated storage
you should