With the new filtering enabled update, a lot of my scripts where broken and I'm trying to fix them all.
One tool I have is run completely by 1 Local Script. One part I'm working on now gave the player an aura (basically just welded an invisible particle emitting part to the character's torso) when a tool is equipped. This is how my LocalScript looked before.
plr = game.Players.LocalPlayer
repeat wait() until plr.Character ~= nil
char = plr.Character
tool = script.Parent
mouse = plr:GetMouse()
aura = tool.aura
function Equip()
stage = 1
aura.Anchored = false
local weld = Instance.new("Weld")
aura.CFrame = char.Torso.CFrame
weld.Parent = aura
weld.Name = "BackWeld"
weld.Part0 = char.Torso
weld.Part1 = aura
whirl()
aura.Constant:Play()
end
tool.Equipped:connect(Equip)
I know I need to use RemoteEvents but I'm still kind of confused about that. How can the regular script In ServerScriptStorage define Local Player and the other variables in the Local Script to be able to run my Equip() function? Do I have to change some of the coding in my functions or can I just call them from the regular script in ScriptServerStorage?

1 comment
Couldn't you just put the particle emitter on the torso?