Touched not working

The remote is for something else, that’s to clone it and put it inside the workspace, the script that is not working is inside the cloned part, so it’s a server script

is it for something like when you touch a coin, you get money and the coin dissapears?

Yep exactly, it’s a 100 dollar bill lol

it could also be that you are not sending the player through the remote, because its the server it cant find the clients player so when firing the remote send through the player

--client--
game.ReplicatedStorage.RemoteEvent:FireServer(game.Players.LocalPlayer)
--server--
game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(plr)
	plr.leaderstats.Money.Value += game.ReplicatedStorage.Players(plr.Name).Chad.MoneyClick.Value
end)

But it’s not a local script though, its a normal script

If it is a coin then you could make different remote events for a coin for example

--client-- 10 Dollar Bill
game.ReplicatedStorage.Dollar10:FireServer(game.Players.LocalPlayer)
--server--
game.ReplicatedStorage.Dollar10.OnServerEvent:Connect(function(plr)
	plr.leaderstats.Money.Value += 10
end
--client-- 100 Dollar Bill
game.ReplicatedStorage.Dollar100:FireServer(game.Players.LocalPlayer)
--server--
game.ReplicatedStorage.Dollar100.OnServerEvent:Connect(function(plr)
	plr.leaderstats.Money.Value += 100
end

This is highly cheatable tho if you do this as a cheater can fire the remote for like 100 coins without touching it

game.ReplicatedStorage.Players(plr.Name).Chad.MoneyClick.Value

Could you explain what this is? Are you making a folder with the players name once they join and generating all of that?

yeah this is the only thing that’s confusing.

Yes, Whenever a player joins, a folder gets created inside another folder called players which is inside replicated storage

Can you run the game and send a screenshot of what ReplicatedStorage looks like fully expanded with the Player folder?

That’s pretty much it

image

It’s adding the players money + 0, that’s why nothing is happening.

1 Like

OMG I JUST REALISED! I’m SOOO stupid… I fixed it THANK YOU! IT WORKKSS

1 Like

if it is suppost the have a value make sure ur setting that value on the server otherwise when adding the 2 numbers tougther in the server it wont pick it up

1 Like

I told you that in the beginning, as to check if there’s something in there.

Oh, didn’t notice but thank you though! I’m so happy it finally works

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.