Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

This RemoteEvent isn't calling the localscript, help?

Basically, I'm making a fog thingy. A modulescript will go through each area's "FogBoxes" and add a Touched event to it. Essentially, it's not calling the localscript that changes fog.

Here's the sending code:

function SetFog(char, id)
    print(game.Players[char.Name])
    game.ReplicatedStorage.Fog:FireClient(game.Players[char.Name], module.FogVals[id])
end

the receiving code:

script.Parent.OnClientEvent:Connect(function(val)

Help?

4 comments

0

And you've confirmed that the local script itself is, in fact, not being called at all such as by putting a print as it's very first action?

0

I put a print in after the receiving code and there was nothing

0

Where is your local script located?

0

@BashCaster game.ReplicatedStorage.Fog.LocalScript

1 answer

Hey guys! So I was doing some research, and I found out that it works when it was moved to StarterPlayerScripts. LocalScripts apparently have to be in the player for it to work.

This discussion is preserved as it was. New answers, comments, and votes are closed.