The only thing it prints is from the client script but it does not print the ones on the server.
Local script:
local button = script.Parent
local eventOpen = game.ReplicatedStorage.Events.Doors.Open
local eventClose = game.ReplicatedStorage.Events.Doors.Close
local DoorClosed = true
local plr = game.Players.LocalPlayer
script.Parent.MouseButton1Click:Connect(function()
print("Clicked")
if DoorClosed == true then
print("Door is closed and will need to be open!")
eventOpen:FireServer(script.Parent.Parent.Adornee.Parent.Parent.Parent)
DoorClosed = false
else if DoorClosed == false then
print("Door is open and will need to be closed!")
eventClose:FireServer(script.Parent.Parent.Adornee.Parent.Parent.Parent)
DoorClosed = true
end
end
end)
Server script:
local DoorOpen = game.ReplicatedStorage.Events.Doors.Open
local DoorClose = game.ReplicatedStorage.Events.Doors.Close
local TS = game:GetService("TweenService")
DoorOpen.OnServerEvent:Connect(function(plr, part)
print("runs")
print(part.Name)
end)
game.ReplicatedStorage.Events.Doors.Open.OnServerEvent:Connect(function(plr, part)
print("runs")
print(part.Name)
end)