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? UNANSWERD

Asked by 9 years ago

when i added

script.IsOpened.Value = true 
script.IsOpening.Value = true
script.Parent.CFrame = cf 
script.OpenSound:Play() 
end

the script suddenly broke. idk why :/

local cf = script.Parent.CFrame

function onClicked()
if script.IsOpened.Value == false and script.IsOpening.Value == false then 
script.IsOpening.Value = true 
for i = 1,16 do 
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0, 0, -0.23) * CFrame.fromEulerAnglesXYZ(0, -0.1, 0) 
wait(0.01) 
end 
script.IsOpening.Value = false 
script.IsOpened.Value = true 
elseif script.IsOpened.Value == true and script.IsOpening.Value == false then 
script.IsOpening.Value = true 
for i = 1,16 do 
script.Parent.CFrame = script.Parent.CFrame * CFrame.fromEulerAnglesXYZ(0, 0.1, 0) * CFrame.new(0, 0, 0.23) 
wait(0.01) 
end 
script.IsOpening.Value = false 
script.IsOpened.Value = false 
script.Parent.CFrame = cf 
script.CloseSound:Play() 
end
script.IsOpened.Value = true 
script.IsOpening.Value = true
script.Parent.CFrame = cf 
script.OpenSound:Play() 
end

script.Parent.ClickDetector.MouseClick:connect(onClicked) 

this is a script in a brick. its a door.

0
Please explain what you are trying to do, where the script is, whether it is a server or local script, and any output. Perci1 4988 — 9y

1 answer

Log in to vote
0
Answered by 9 years ago

It has no tooting brick in it :/

0
ik their is one Xandenge 0 — 9y
Ad

Answer this question