Hey Developers, I’m making this system where u press a button on a surfacegui and it fires an event saying what you have done and then duplicates a text label and puts it into a surfacegui, I’m a bit stuck as I cant find any errors in the console.
game.ReplicatedStorage.LogEvent.OnServerEvent:Connect(function(Player, log, message)
if log == "TechLog" then
local messagelog = script.TextLabel:Clone()
messagelog.Parent = script.Parent.Parent.SurfaceGui.TechLogs.ScrollingFrame
messagelog.Text = message
if log == "SystemLog" then
if log == "ExploitLog" then
end
end
end
end)
MouseButton1Click doesn’t provide any arguments, so Player is nil
Roblox automatically passes the player who fired the remote as the first argument on the server (Remove Player from there)
Your end placements are incorrect here (You can also use elseif or tables):
if log == "TechLog" then
local messagelog = script.TextLabel:Clone()
messagelog.Parent = script.Parent.Parent.SurfaceGui.TechLogs.ScrollingFrame
messagelog.Text = message
elseif log == "SystemLog" then
elseif log == "ExploitLog" then
end
if log == "TechLog" then
local messagelog = script.TextLabel:Clone()
messagelog.Parent = script.Parent.Parent.SurfaceGui.TechLogs.ScrollingFrame
messagelog.Text = message
elseif log == "SystemLog" then
elseif log == "ExploitLog" then
end
Yep, done that it’s weird it wont even print something. I’ve never experienced this issue. Idk if the problem is because its a local script but even when I try: