Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do i make it so when a player from the group joins he recieves a flame?

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?

2 answers

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.