Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

This RemoteEvent isn't calling the localscript, help?

Asked by 5 years ago

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?

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? XxTrueDemonxX 362 — 5y
0
I put a print in after the receiving code and there was nothing VikingCatto 15 — 5y
0
Where is your local script located? DeceptiveCaster 3761 — 5y
0
@BashCaster game.ReplicatedStorage.Fog.LocalScript VikingCatto 15 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

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.

Ad

Answer this question