So I Have A LOCAL SCRIPT In Starter Gui Which Detects When A text button in a SCREEN GUI is clicked, the remote event does print ("Yay It Works"), Whats Wrong?
player.PlayerGui.TradeGui.LocalPlayerTrade.AcceptButton.Activated1:Connect(function()
local Player2 = player.player2trade.Value
local plrnamelocal = player.Name
game.ReplicatedStorage.TrdEvent:FireServer(Player2, plrnamelocal)
end)
It is MouseButton1Click. Here is what it'd look like!
player.PlayerGui.TradeGui.LocalPlayerTrade.AcceptButton.MouseButton1Click:Connect(function() local Player2 = player.player2trade.Value local plrnamelocal = [player.Name] game.ReplicatedStorage.TrdEvent:FireServer(Player2, plrnamelocal) end)
Where is "player" defined?
Also, I recommend NOT making the script work in the PlayerGui place. Because, it's not efficient. A good way is making it work then Clone it then make the clone in the PlayerGui.