So basically this script is supposed to be so when you collect a coin, it gives you a certain amount of coins then removes itself. I am trying to make it so if they have a certain upgrade they get more money from the coins but when I collect it, it gives me no cash even though I set my multiplier to 10.
local baseamount = 10
script.Parent.Touched:Connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if hit.Parent:FindFirstChild("Humanoid") then
local multvalue = player.extra.multiplier.Value
local multipler = baseamount * multvalue
player.leaderstats.Cash.Value = player.leaderstats.Cash.Value + multipler
script.Parent:Destroy()
end
end)

6 comments
Try printing out what "multipler" is before destroying the script, see if it has a value. Is this a local script?
Based on your script if multiplier has no value then 10 x anything is nothing, so it wouldnt work.
The multiplier has a value of 10. I set it while in studio. It's not a local script aswell. If I set it using a script when I join it works. How would I make it so that when it changes it will always work?
Thats your issue. Changing the value while in studio counts as a client sided change, and will not be recognized by a server script.
I also recommend you follow the changes Diezel outlined in his answer, they're all good. Trying changing the players multiplier value inside the script, and it should work correctly.(just for testing)
In case i wasnt clear, this is a Filtering Enabled issue, changes made to server created values from the client will not replicate. If the server created the Multiplier then the server MUST change the value.