So, this server script won't work, No errors or anything. I want it to fire a server when a player clicks a click detector but it won't work for some reason, I'd appreciate if you would help me!
Code:
local RemoteEvent = game.ReplicatedStorage.Clothing local Click = script.Parent Click.MouseClick:Connect(function(Clicked) if Clicked.Name == game:GetService("Players").LocalPlayer then script.Parent.SurfaceGui.Frame.Description = Clicked.Name.."'s Avatar Booth" workspace.Dummy.Name = Clicked.Name print(Click.Name..": Claimed A Booth!") RemoteEvent:FireServer() end end)
-- local
local RemoteEvent = game.ReplicatedStorage.Clothing local Click = script.Parent Click.MouseClick:Connect(function(Clicked) if Clicked.Name == game:GetService("Players").LocalPlayer then RemoteEvent:FireServer() end end)
-- Server
local RemoteEvent = game.ReplicatedStorage.Clothing RemoteEvent.OnServerEvent:Connect(function() script.Parent.SurfaceGui.Frame.Description = Clicked.Name.."'s Avatar Booth" workspace.Dummy.Name = Clicked.Name print(Click.Name..": Claimed A Booth!") end)
Easy as that.