I was truly confused with this issue as I have sempt to debug everything correctly to show what happening, at it doesnt seem to be working.
The way this works is that I have a StarterPlayer localscript going firing out a Remote Event ‘bazinga’. The fire is received into a server script located within a model located in ReplicatedStorage.
I have this under a spawn function() in my StarterPlayer script:
local mouse = Player:GetMouse()
local bulletstuff = FindModel:WaitForChild() -- FindModel finds to model in ReplicatedStorage
local bazinga = bulletstuff:WaitForChild("bazinga") -- bulletstuff is a folder within the model
...
local mousePos = mouse.Hit.Position
bazinga:FireServer(mousePos)
...
ammo = ammo - 1 --# prints anytime I click, used as debug
print(ammo)
Then this is what I have in my model:
local bulletstuff = script.Parent
local bazinga = bulletstuff:WaitForChild("bazinga")
local FastCast = require(bulletstuff.FastCastRedux)
local function fire(player, mousePos)
print("shooted doe!") --not printing (fun)
end
bazinga.OnServerEvent:Connect(fire) --connec
Any sort of help would be appreciated, thanks!