I am new to coding although i am preatty good at gui coding. I want it so when a player joins the game it checks if they are in the group and if they are they recieve a flame of a random color.
Could someone explain how to make that?
I am new to coding although i am preatty good at gui coding. I want it so when a player joins the game it checks if they are in the group and if they are they recieve a flame of a random color.
Could someone explain how to make that?
is it?
game.Players.PlayerAdded:connect(function(plr)
if per:IsInGroup(id here) then
frome here i do not know what to do...
Hmmm, the script would look a little something like this:
math.randomseed(tick()) -- Another layer of random
game.Players.PlayerAdded:connect(function(plr)
if plr:IsInGroup( groupId ) then -- Replace 'groupId' with the group ID of your choosing
local plrModel = game.Workspace:WaitForChild(plr.Name);
local flame = Instance.new("Fire", plrModel["LowerTorso"]) -- Might need to change index based on if R15 is enabled or not
flame.Color = Color3.new(math.random(), math.random(), math.random())
flame.Name = "Flame" -- For external indexing
end
end)
This should work -- if you have any questions about it, or just need more help in general, let me know!
This discussion is preserved as it was. New answers, comments, and votes are closed.