Hi.
I am wanting to create light wands / glow stick type things that players can hold during a show.
I want it to be scripted to that the people in the control booth can make everyone’s wands light up and flash etc during songs.
How would I go about referencing each of the wands in each players tools?
I can script everything, just needing help on how to reference the tool for each player.
local players = game:GetService("Players")
for _, player in ipairs(players:GetPlayers()) do
local character = player.Character
local backpack = player:WaitForChild("Backpack")
local humanoid = character:WaitForChild("Humanoid")
if backpack:FindFirstChild("GlowStick") then
local glowstick = backpack:FindFirstChild("GlowStick")
humanoid:EquipTool(glowstick)
--do stuff with glowstick here
end
end
This checks each player’s inventory for a tool named “GlowStick” and equips it, I’ve added a comment where you can perform any necessary actions with the glowstick tool.