local Bank = script.Parent
local PartName = "Cash"
local Collector = game.Workspace.BramsTycoon.Essentials.MoneyCollector.Collector
local MoneyAmount = 0
Bank.Touched:connect(function(hit)
if hit.ClassName == "Part" and hit.Name == PartName then
hit:remove()
Collector.Money.Value = Collector.Money.Value + MoneyAmount
end
end)
local IntVal = Instance.new("IntValue")
IntVal.Name = "Cash"
IntVal.Parent = Collector
IntVal.Value = 0
the error is Touched is not a valid member of ServerStorage. Do i need to put this script somewhere else or is something wrong whit the script?

2 comments
so where do i need to put the script then?
somewhere WHERE THE CHARACTER CAN TOUCH