I have been trying for 3 hours now, the "Spread" function in the "ServerSide" script isnt running when invoking "InvokeServer()", out of all the prints in here the only thing printed to chat is this: "Temp debug: Invoking server"
No errors happen.
"Main" local script, trying to invoke the function that isnt working
local SpreadEvent = script:WaitForChild("Spread")
function Spread()
print("Temp debug: Invoking server")
local Target = SpreadEvent:InvokeServer() --made a oversight, now it does alot of stuff in a normal script so other clients receive it
print("Temp debug: Server Responded")
****Removed rest of code since its not related****
end
"ServerSide" Script, This function is the one i want to run
local SpreadEvent = script.Parent:WaitForChild("Spread")
function Spread()
print("Temp debug: Spread Assister Called (Server-side)")
local PossibleAreas = FindFreeLocations()
local Target = PossibleAreas[math.random(1,#PossibleAreas)] --Chooses random bodypart
if #PossibleAreas == 0 then return end
local NewResources = Resources:Clone()
local Infector = Resources.Scripts.Infect:Clone()
NewResources.Parent = Infector
Infector.Parent = Target
Infector.Disabled = false
print("New bodypart (".. Target.Name.. ") Infected.")
coroutine.wrap(HpChangeSymptom)()
return Target
end
SpreadEvent.OnServerInvoke = Spread
These are only snippets of the scripts related to the issue
Explorer view of the scope the scripts use (Image, couldn't attach files): https://ibb.co/qBZhvHK

4 comments
do you ever call ur function?
and please take ur serverside script out of the character, put it in serverscriptservice
There’s multiple, 1 for each player infected. I can’t
Think i found the issue, the serverside script isnt running at all, maybe since its parented to the local script? Im going to rework it and see if that works