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

How would one add a model or hat to a character when they spawn?

Asked by 7 years ago

i dont know where to start would someone please help because i want like if a person is on a certain team they will spawn with headphones and stuff

1 answer

Log in to vote
0
Answered by
TrippyV 314 Donator Moderation Voter
7 years ago
Edited 7 years ago

First of all, make sure to put an effort towards trying some stuff out first and telling us how it goes.

Besides that, what you're asking is relatively simple.

Simply make a script in ServerScriptService and put the following code into it:

local model = PutTheModelLocationHere
local team = PutTheTeamLocationHere

local players = game:GetService("Players")

players.PlayerAdded:connect(function(plr)
    plr.CharacterAdded:connect(function(char)
        if plr.TeamColor == team.TeamColor then
            model:Clone().Parent = char
        end
    end)
end)

If all goes well, this should work out for you!

If you have any troubles with the script provided, please comment the error messages from the output and I'll try to resolve it for you.

EDIT: Make sure you put the model and team location in correctly

0
Thank you very much and next time ill try to put as much effort as possible Ssj4Gokhan10 14 — 7y
Ad

Answer this question