Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 7 years ago

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?

Closed as Not Constructive by Perci1

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

2 answers

Log in to vote
0
Answered by 7 years ago

is it?

game.Players.PlayerAdded:connect(function(plr)
    if per:IsInGroup(id here) then

frome here i do not know what to do...

Ad
Log in to vote
0
Answered by 7 years ago
Edited 7 years ago

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!