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

This script is not doing anything acording to the past script. Can someone help me? I'm desperate.

Asked by 6 years ago

Guys I need help, like serious help! This is the previous script that was working when i first tried it.

script.Parent.Touched:connect(function(hit)
if hit.Parent.Name == "Card" then
if not locked and not ismoving then
    script.Pling:Play()
    script.Parent.Parent.Display.GUI.Message.BackgroundColor3 = Color3.new(0,1/255,0)
    script.Parent.Parent.Display.GUI.Message.Text = "Accepted!"
    wait(1)
    script.Parent.Parent.Display.GUI.Message.Text = ""
elseif locked and not ismoving then
    script.Pling:Play()
    script.Parent.Parent.Display.GUI.Message.BackgroundColor3 = Color3.new(1/255,1/255,0)
    script.Parent.Parent.Display.GUI.Message.Text = "Denied!"
    wait(1)
    script.Parent.Parent.Display.GUI.Message.Text = ""
elseif ismoving then
    script.Pling:Play()
    script.Parent.Parent.Display.GUI.Message.BackgroundColor3 = Color3.new(1/215,1/255,0)
    script.Parent.Parent.Display.GUI.Message.Text = "Wait!"
    wait(1)
    script.Parent.Parent.Display.GUI.Message.Text = ""
end
if not IsOpen and not cooldown and not locked then
ismoving = true
IsOpen = true
cooldown = true
doubledoor.Doors.Door1.ExtraDoor.MoveExtraDoor1.OpenExtraDoor1:FireServer()
doubledoor.Doors.Door2.ExtraDoor.MoveExtraDoor2.OpenExtraDoor2:FireServer()
openextrasound:Play()
wait(2)
doubledoor.Doors.Door1.MoveDoor1.OpenDoor1:FireServer()
doubledoor.Doors.Door2.MoveDoor2.OpenDoor2:FireServer()
opendoorsound:Play()
wait(3)
cooldown = false
ismoving = false
elseif IsOpen and not cooldown and not locked then
    ismoving = true
    IsOpen = false
    cooldown = true
    closedoorsound:Play()
    doubledoor.Doors.Door1.MoveDoor1.CloseDoor1:FireServer()
    doubledoor.Doors.Door2.MoveDoor2.CloseDoor2:FireServer()
    wait(3)
    closeextrasound:Play()
    doubledoor.Doors.Door1.ExtraDoor.MoveExtraDoor1.CloseExtraDoor1:FireServer()
    doubledoor.Doors.Door2.ExtraDoor.MoveExtraDoor2.CloseExtraDoor2:FireServer()
    wait(3)
    cooldown = false
    ismoving = false
       end
end
wait(10)
if IsOpen and not cooldown and not locked then
    ismoving = true
    IsOpen = false
    cooldown = true
    closedoorsound:Play()
    doubledoor.Doors.Door1.MoveDoor1.CloseDoor1:FireServer()
    doubledoor.Doors.Door2.MoveDoor2.CloseDoor2:FireServer()
    wait(3)
    closeextrasound:Play()
    doubledoor.Doors.Door1.ExtraDoor.MoveExtraDoor1.CloseExtraDoor1:FireServer()
    doubledoor.Doors.Door2.ExtraDoor.MoveExtraDoor2.CloseExtraDoor2:FireServer()
    wait(3)
    cooldown = false
    ismoving = false
end
end)

But when I changed some stuff it stoped working I don't know why! Here's the new script I've made:

script.Parent.Touched:connect(function(hit)
if hit.Parent.Name == "Card" then
if not locked and not ismoving then
    script.Pling:Play()
    script.Parent.Parent.Display.GUI.Message.TextColor3 = Color3.new(0,255,0)
    script.Parent.Parent.Display.GUI.Message.Text = "Accepted!"
    wait(1)
    script.Parent.Parent.Display.GUI.Message.Text = ""
elseif locked and not ismoving then
    script.Pling:Play()
    script.Parent.Parent.Display.GUI.Message.TextColor3 = Color3.new(255,0,0)
    script.Parent.Parent.Display.GUI.Message.Text = "Denied!"
    wait(1)
    script.Parent.Parent.Display.GUI.Message.Text = ""
elseif ismoving then
    script.Pling:Play()
    script.Parent.Parent.Display.GUI.Message.TextColor3 = Color3.new(255,255,0)
    script.Parent.Parent.Display.GUI.Message.Text = "Wait!"
    wait(1)
    script.Parent.Parent.Display.GUI.Message.Text = ""
end
if not IsOpen and not cooldown and not locked then
ismoving = true
IsOpen = true
cooldown = true
doubledoor.Doors.Door1.ExtraDoor.MoveExtraDoor1.OpenExtraDoor1:Fire()
doubledoor.Doors.Door2.ExtraDoor.MoveExtraDoor2.OpenExtraDoor2:Fire()
openextrasound:Play()
wait(2)
doubledoor.Doors.Door1.MoveDoor1.OpenDoor1:Fire()
doubledoor.Doors.Door2.MoveDoor2.OpenDoor2:Fire()
opendoorsound:Play()
wait(3)
cooldown = false
ismoving = false
elseif IsOpen and not cooldown and not locked then
    ismoving = true
    IsOpen = false
    cooldown = true
    closedoorsound:Play()
    doubledoor.Doors.Door1.MoveDoor1.CloseDoor1:Fire()
    doubledoor.Doors.Door2.MoveDoor2.CloseDoor2:Fire()
    wait(3)
    closeextrasound:Play()
    doubledoor.Doors.Door1.ExtraDoor.MoveExtraDoor1.CloseExtraDoor1:Fire()
    doubledoor.Doors.Door2.ExtraDoor.MoveExtraDoor2.CloseExtraDoor2:Fire()
    wait(3)
    cooldown = false
    ismoving = false
end
end
end)
wait(10)
if IsOpen and not cooldown and not locked then
    ismoving = true
    IsOpen = false
    cooldown = true
    closedoorsound:Play()
    doubledoor.Doors.Door1.MoveDoor1.CloseDoor1:Fire()
    doubledoor.Doors.Door2.MoveDoor2.CloseDoor2:Fire()
    wait(3)
    closeextrasound:Play()
    doubledoor.Doors.Door1.ExtraDoor.MoveExtraDoor1.CloseExtraDoor1:Fire()
    doubledoor.Doors.Door2.ExtraDoor.MoveExtraDoor2.CloseExtraDoor2:Fire()
    wait(3)
    cooldown = false
    ismoving = false
end

I possitioned the end's the way they were in the other script but the script wouldn't work. Something is wrong and I don't know why.. I did so much work this morning and I don't want to lose it all! Please somebody help! PLEASE!

--//Variables\\--
local doubledoor = script.Parent.Parent.Parent.Parent
local door1 = doubledoor.Doors.Door1.Mainframe
local door2 = doubledoor.Doors.Door2.Mainframe
local IsOpen = false
local cooldown = false
local confgs = doubledoor.Configurations
local openextrasound = confgs.OpenExtraDoor
local closeextrasound = confgs.CloseExtraDoor
local opendoorsound = confgs.OpenDoor
local closedoorsound = confgs.CloseDoor
local locked = false
local ismoving = false

I've have alot to give to whoever helps me. Please!

0
Try removing the end block on line 50. Are there errors? Cba to look at this more lol. Impacthills 223 — 6y
0
Check developer console then come back to use with any errors for this in the console. helperobc 52 — 6y
0
Well... why did you change FireServer() to Fire() ? Programical 653 — 6y
0
I was using Remove events and changed to bindable functions. wilsonsilva007 373 — 6y
0
And the console says literally nothing wilsonsilva007 373 — 6y

Answer this question