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

Remote Event not firing or being recognized as firing by script?

Asked by 6 years ago

I'm trying to convert a door script to FE so that it will open for everyone, but I am having an issue with the Remote Event or the Script not recognizing it being fired. If anyone can help me figure out what is wrong, that will help greatly thank you!

Local Script:

control =  script.Parent:WaitForChild("Dawr")
Butts = script.Parent
B1 = Butts.Door1
B2 = Butts.Door2
B3 = Butts:WaitForChild("Door3")


B1.MouseButton1Click:Connect(function()
    local door = 1
    control:FireServer(door)
    print("Fired")
end)
B2.MouseButton1Click:Connect(function()
    local door = 2
    control:FireServer(door)
    print("Fired")
end)
B3.MouseButton1Click:Connect(function()
    local door = 3
    control:FireServer(door)
    print("Fired")
end)

script:

controleve = script.Parent:WaitForChild("Dawr")


function changedoor(plr, door)
    print(door)
    local DoorFrame = game.Workspace:FindFirstChild("DHLSD"..door)
    local door2 = script:FindFirstChild("D"..door)
    --if door2.Value == false then
    DoorFrame.Frame.Transparency = 1
    DoorFrame.Glass.Transparency = 1
    DoorFrame.Others.Transparency = 1
    DoorFrame.Frame.CanCollide = false
    DoorFrame.Glass.CanCollide = false
    DoorFrame.Others.CanCollide = false
    print("Done! Door Opened!")
    wait(15)
    DoorFrame.Frame.Transparency = 0
    DoorFrame.Glass.Transparency = 0.4
    DoorFrame.Others.Transparency = 0
    DoorFrame.Frame.CanCollide = true
    DoorFrame.Glass.CanCollide = true
    DoorFrame.Others.CanCollide = true
    print("Done! Door Closed!")
--  else return false
    --end
end


controleve.OnServerEvent:Connect(changedoor)

Answer this question