Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why isn't this script working?[NOT ANSWERED]

Asked by 9 years ago
function onTouched(part)
    part.Anchored = false;
    part.CanCollide = false
end

script.Parent.Touched:connect(onTouched)

The scripts parent is part, and when the part touches another part, it's supposed to make the touched part fall, then destroy itself. But it doesn't work. I have more scripts inserted in that part:

while true do
    wait()
    script.Parent.CFrame = script.Parent.CFrame + Vector3.new(0,.1,0)
end

and

while true do
    wait(5)
    local clone = script.Parent:Clone()
    clone.Parent = workspace
    clone.Transparency = 0
    clone.CFrame = workspace.PartP.CFrame + Vector3.new(-.5,1,0)
end

All the scripts work except for the first one.

0
What happens when you try to run the script? Does it run just fine or does an error appear in output? IcyArticunoX 355 — 9y
0
Nothing is in the output Senor_Chung 210 — 9y
0
When it touches a part nothing happens. Senor_Chung 210 — 9y

Answer this question