local event = game.ReplicatedStorage.FlagEvent
event.OnServerEvent:Connect(function(plr, id)
local Character = plr.Character
local Backpack = plr:FindFirstChildOfClass("Backpack")
if not (Character or Backpack) then return end
local Flag = Character:FindFirstChild("Flag") or Backpack:FindFirstChild("Flag")
if not Flag then return end
script.Parent.TextureID = "rbxthumb://type=Asset&id="..id.."&w=420&h=420"
end)
I wanted the script to be server sided so everyone can see, but the script also applies to everyone’s flag when held.
If this is a tool, then I think it’d be better to put the event in the tool. If the remote event is just one singular event, then once it’s activated it tells everything connected to do that thing. If the event is in a tool, it would be referenced as “script.Parent” or something usually and that’s referring to the tool’s own remote event.
If an event is in somewhere like ReplicatedStorage then it fires for everything since everything knows where it is. If it’s individually in the tool, it will fire its own event rather than one connected to everything.
Just put the event in the tool and it should work fine.