hello, im currently having a problem with the highlight only being visible to the localplayer (you). heres what i mean:
both players currently have a highlight, and for some reason i can see the highlight on each separate device’s account, but not on the other account (basically i can only see it on the localplayer on each device). idk if that could help or anything but here is a script that spawns a highlight when the particle effects are equipped:
(localscript in the particle effects that are equipped on both accounts
local char = game.Players.LocalPlayer.Character
local highlight = game.ReplicatedStorage.Highlight:Clone()
local fillcolor = Color3.fromRGB(255, 245, 102)
local outlinecolor = Color3.fromRGB(255, 245, 102)
local filltransparency = 0.5
local outlinetransparency = 0
highlight.Parent = char
highlight.FillColor = fillcolor
highlight.OutlineColor = outlinecolor
highlight.FillTransparency = filltransparency
highlight.OutlineTransparency = outlinetransparency
and localscript in the highlight, deleting it when particle is unequipped:
local player = game.Players.LocalPlayer
local char = player.Character
local folder = char:WaitForChild("Aura")
local highlight = script.Parent
while true do
if highlight.Parent == char and not folder:FindFirstChildWhichIsA("Folder") then
highlight:Destroy()
end
wait()
end
How do you want both the accounts to see it if it’s a local script? If you want the highlight to be visible to everyone you have to use a server script to create and place it or use remote events
you could either use a remote event or make the highlight in a serverscript. from what i can see, that game looks cool
why you need to use a remote event or write it on a regular script is because on localscripts everything is visible to you only since it doesn’t fire on the server. i recommend you research what the difference between a client and a server
ohh but how would i do that then? since i need the localplayer variable and i dont think i can use playeradded/characteradded right? (btw as a person who just started making games tysm for complimenting my game )
For the future: yes of course you can use playeradded and characteradded on server, even if that wasn’t the case you could just use a remote event to inform the server about the highlight or the player using the skill. I assume you know how playeradded and characteradded work so I’ll explain remote events just in case you ever need them: you use remote events to basically pass information either from the client to the server (fireserver) or from the server to the client (fireclient or fireallclients)