Hey there! I need a little help here.
So, I don’t know how I can detect if a player pressed a GUI element while the script is in the workspace. Basically, when I press a GUI button, it should just, let’s say, print something to the output, except that the script identifies who pressed it while it’s in workspace.
I don’t know if PlayerAdded helps, or GetPlayerFromCharacter, I just need help. If you need something from me, please tell me.
-- workspace script
local event = game:GetService("ReplicatedStorage"):WaitForChild("RemoteEvent") --or whereveevereefvsds it is
event.OnServerEvent:Connect(function()
end)
&
-- local script
local event = game:GetService("ReplicatedStorage"):WaitForChild("RemoteEvent") --or whereveevereefvsds it is
event:FireServer()