hello, I was working on this code:
local debounce = false
script.Parent.Touched:Connect(function(hit)
if not debounce and hit.Name == "Core" then
debounce = true
local weld = Instance.new("WeldConstraint")
weld.Parent = script.Parent
weld.Part0 = script.Parent
weld.Part1 = hit
wait()
script.Parent.Stick1b.Disabled = true
script.Parent.Name = "OrbPart2"
wait(0.1)
script.Disabled = true
wait(2)
debounce = false
end
end)
the code worked nicely and I just needed to add one more thing to it:
local debounce = false
script.Parent.Touched:Connect(function(hit)
if not debounce and hit.Name == "Core" then
debounce = true
local weld = Instance.new("WeldConstraint")
weld.Parent = script.Parent
weld.Part0 = script.Parent
weld.Part1 = hit
wait()
script.Parent.Stick1b.Disabled = true
script.Parent.Color.Disabled = false
script.Parent.Name = "OrbPart2"
wait(0.1)
script.Disabled = true
wait(2)
debounce = false
end
end)
I added some code to enable a script inside the same part but it doesnt seem to like it very much and stops right were I added the new line. I dont understand why script.Color.Disabled comes as an error when the line script.Parent.Stick1b.Disabled works just fine. if its something I missed let me know, thanks.

1 comment
it works thank you, I had no idea script names would interfere with parts.