Hi. I am trying to make a script, which changes coins for other players.
The amount of Coins is getting put into a TextBox.
Now, I am getting an error which says "attempting to call a nil value"
I have no clue why, checked the scripts multiple times.
LocalScript:
local event = game.ReplicatedStorage.CoinChange
script.Parent.MouseButton1Click:Connect(function()
print(script.Parent.Parent.CoinsAmount.Text)
event:FireServer()
end)
Script:
local event = game.ReplicatedStorage.CoinChange
local function CoinChange()
print("Works!")
end
event.OnServerEvent:Connect(CoinChange())
Do I oversee something?

2 comments
if this is a money gui, u totally dont need a remote event, just make it change the text to the desired leaderstat
It is a GUI for admins to change others money. Thats why I have a RemoteEvent