Honestly havn't scripted in a long time so it may be me but my research tells me Im doing something wrong or its just roblox being like that to me it wont even print "Firedfromhandle"
Script
local Player = game.Players.LocalPlayer local PlayerName = Player.Name function OnActivated() print("Firedfromhandle") game.ReplicatedStorage.Money.Add.Money["1$"]:FireServer(Player, PlayerName) end script.Parent.Activated:Connect(OnActivated)
Event
local FolderForDropMoney = game.ReplicatedStorage.Money.Add.Money FolderForDropMoney["1$"].OnServerEvent:Connect(function(Player, PlayerName) print("Fired") if game.Workspace:FindFirstChild(PlayerName)["1"] then game.Workspace:FindFirstChild(PlayerName)["1"]:Destroy() Player.stats.Money.Value = Player.stats.Money.Value + 1 end end)
I think that is because you are misunderstanding how remote events work, the first argument by default is the player who fired the event, you do not need to send that over, as for playername, you can just do Player.Character["1"]
local script
local Player = game.Players.LocalPlayer local function OnActivated() print("Firedfromhandle") game.ReplicatedStorage.Money.Add.Money["1$"]:FireServer() end script.Parent.Activated:Connect(OnActivated)
Server script
local FolderForDropMoney = game.ReplicatedStorage.Money.Add.Money FolderForDropMoney["1$"].OnServerEvent:Connect(function(Player) print("Fired") if Player.Character["1"] then Player.Character["1"]:Destroy() Player.stats.Money.Value = Player.stats.Money.Value + 1 end end)