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

street light doesn't go to original pos?

Asked by 3 years ago

i am sooooooo close to finishing this feature to my game i can feel it

i just need some one to fix this script

i am making a street light that will regenerate when knocked down

i also have a script that will save the original pos

script.Parent.Union.Touched:Connect(function()

    script.Parent.TouchesTillKnockOver.Value = script.Parent.TouchesTillKnockOver.Value - 1


    if script.Parent.UnAnchored.Value == true then
        wait(10)

        script.Parent.Union.Position = script.Parent.Union.originalPos.Value
        script.Parent.Union.Orientation = script.Parent.Union.originalOri.Value
        script.Parent.Union1.Position = script.Parent.Union1.originalPos.Value
        script.Parent.Union1.Orientation = script.Parent.Union1.originalOri.Value
        script.Parent.Part.Position = script.Parent.Part.originalPos.Value
        script.Parent.Part.Orientation = script.Parent.Part.originalOri.Value
        script.Parent.base.Position = script.Parent.base.originalPos.Value
        script.Parent.base.Orientation = script.Parent.base.originalOri.Value
        script.Parent.light.Position = script.Parent.light.originalPos.Value
        script.Parent.light.Orientation = script.Parent.light.originalOri.Value
        print("back to how it started")
        script.Parent.SoundScript.StopScrpt.Value = true
    end
end)

if script.Parent.TouchesTillKnockOver.Value == 0 then

end
    --game.Players:GetPlayerFromCharacter (hit.Parent)
    --script.parent.Part

Answer this question