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

Sliding doors scripting issue howwwwwwwwwwwwwwww?

Asked by 4 years ago

I am making a sliding doors, here is my script. I'm very new to Lua so I hope you guys can help me

Doors = script.Parent
Rdoor = Doors.Right
Ldoor = Doors.Left
Enabled = true
function Touch(touch)
if Enabled == true then
Enabled = false
for a = 1,31 do
Rdoor.CFrame = CFrame.new(Rdoor.CFrame.x - 1,Rdoor.CFrame.y,Rdoor.CFrame.z)
Ldoor.CFrame = CFrame.new(Ldoor.CFrame.x + 1,Ldoor.CFrame.y,Ldoor.CFrame.z)
wait(0.1)
end 
end

Doors.Out.Touched:Connect(Touch)

help? Your title should be specific! Describe your problem concisely. <--- this is annoying

0
this wont change anything, but the point of the a in the for loop is a number variable that's value is the number's which you chose (1, 31) so instead of doing - 1 and + 1 do - a and + a wookey12 174 — 4y
0
thanks Organic_Cow -4 — 4y

Answer this question