hello i am making a game, but in the game i wanted my player to have fire in his torso so i kinda looked like a vortex, i have made it in studio and then put the model to code so when i spawn im the only one who has it, but its dont seem to work, it prints the text at the end but dont add fire to my torso. if anyone could help me and show where i went wrong that would be so helpful.
Thank you in advance
game.Players.PlayerAdded:connect(function(plr) plr.CharacterAdded:connect(function(char) if plr.Name == "UpOntoNebula" then local fire = Instance.new("Fire", char.LowerTorso) fire.Color = Color3.new(44, 0, 67) fire.SecondaryColor = Color3.new(25, 109, 88) fire.Heat = 2 fire.Size = 3 fire.Enabled = true print("Fire Added") end end) end)
Hello, I will help you with this one:
:Connect
instead of :connect
because :connect
is deprecated. ServerScriptService
or Workspace
and it is inside of Script
Fixed code:
game.Players.PlayerAdded:Connect(function(plr) plr.CharacterAdded:Connect(function(char) if plr.Name == "UpOntoNebula" then local fire = Instance.new("Fire") fire.Color = Color3.new(44, 0, 67) fire.SecondaryColor = Color3.new(25, 109, 88) fire.Heat = 2 fire.Size = 3 fire.Enabled = true fire.Parent = char.LowerTorso end end) end)
Fixed code is tested and it's working.