local lumos = game.StarterPack.Wand.Handle.ParticlePart.Lumos
game.Players.LocalPlayer.Chatted(function(message)
if message == "Lumos" then
lumos.Enabled = true
end
end)
It is in a LocalScript. What did I mess up?
local lumos = game.StarterPack.Wand.Handle.ParticlePart.Lumos
game.Players.LocalPlayer.Chatted(function(message)
if message == "Lumos" then
lumos.Enabled = true
end
end)
It is in a LocalScript. What did I mess up?
Make it a normal script inside of ServerScriptService
game.Players.PlayerAdded:Connect(function(plr)
plr.Chatted:Connect(function(message)
local lumos = plr:WaitForChild("Backpack").Wand.Handle.ParticlePart.Lumos
if message == "Lumos" then
lumos.Enabled = true
end
end)
end)
you forgot to add :connect inbetween Chatted and (function(message)
Check this out
game.Players.PlayerAdded:connect(function(player)
plr.Chatted:connect(function(message)
repeat wait() until player:WaitForChild("Backpack")
local lumos = player.Backpack.Wand.Handle.ParticlePart.Lumos
if message == "Lumos" then
lumos.Enabled = true
end
end)
end)
If this works, please mark as solved!
As always, keep the good scripting!
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
a lot