I’m trying to activate something in another script using a proximity prompt but it doesn’t work
I’ve looked at the other posts and I can’t figure out what is happening
clientside
game.ReplicatedStorage.ammorefill.OnClientEvent:Connect(function(ammo)
magcount = mostmags
cammo = maxsize
game.ReplicatedStorage.ammoupdate:FireServer(cammo,magcount,j,b)
end)
serverside
button = script.Parent["ammo refiller"]
ammo = 3
button.Triggered:Connect(function()
if ammo > 0 then
game.ReplicatedStorage.ammorefill:FireClient(ammo)
ammo-=1
wait(5)
end
end)
it prints unable to assign value when i activate the button