I am not receiving any errors, and all the print statements are printing (print debugging).
Script used for firing the BindableEvent:
script.Parent.MouseClick:Connect(function(plr)
game.ReplicatedStorage.LogAction:Fire(plr, "coolant on")
end)
Script used for receiving the event, and cloning the textlabel
game.ReplicatedStorage.LogAction.Event:Connect(function(player, what)
print("received")
if what == "coolant on" then
print("coolant on")
if script.Parent.FirstAction.Visible == false then
print("first action")
script.Parent.FirstAction.Text = player.Name .. " turned on the coolant"
print("first action text")
script.Parent.FirstAction.Visible = true
print("first action visible")
print("--------------------------------------------------------")
else
print("new action")
local clone = script.Parent.FirstAction:Clone()
print("cloned")
clone.Name = player.Name .. " : " .. "coolant on"
print("name")
clone.Text = player.Name .. " turned on the coolant"
print("text")
clone.Visible = true
print("visible")
print("--------------------------------------------------------")
end
elseif what == "coolant off" then
if script.Parent.FirstAction.Visible == false then
script.Parent.FirstAction.Text = player.Name .. " turned off the coolant"
script.Parent.FirstAction.Visible = true
else
local clone = script.Parent.FirstAction:Clone()
clone.Name = player.Name .. " : " .. "coolant off"
clone.Text = player.Name .. " turned off the coolant"
end
end
end)
Video:
All help is appreciated!