I have been trying to make it so that whenever my fellow dev or I enter a server for the game, sparkles appear around our heads. So far, this is what I've got:
function ifDevEntered(player)
local dev = (
player.Name("DevSupremecy") or
player.Name("Dev_Noobity")
)
if dev then
local sparkle = Instance.new("Sparkles")
sparkle.Enabled = true
sparkle.Parent(player.Character.Head)
sparkle.SparkleColor(255, 0, 0)
end
end
I think I've got the API calls right, so I think the problem's with the IF-THEN statement.
LocalScript
:
devs = { "name1", "name2", "name3", "name4" } plr = game.Players.LocalPlayer wait(1) local head = plr.Character:FindFirstChild("Head") for i = 1, #devs do if (string.lower(plr.Name) == string.lower[devs[i])) then local sparkles = Instance.new("Sparkles",head) sparkles.SparkleColor = Color3.new(255/255, 0/255, 0/255) end end
Script
:
devs = { "name1", "name2", "name3", "name4" } game.Players.PlayerAdded:connect(function(plr) wait(1) local head = plr.Character:FindFirstChild("Head") for i = 1, #devs do if (string.lower(plr.Name) == string.lower(devs[i])) then local sparkles = Instance.new("Sparkles",head) sparkles.SparkleColor = Color3.new(255/255, 0/255, 0/255) end end end)