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

starterpack script not working on server, why?

This localscript is in StarterPack, when i upload it to a server it doesn,t working... don't understand why.

local player = game.Players.LocalPlayer
local character = player.Character

game.Workspace:WaitForChild(game.Players.LocalPlayer.Name)

character.Head.BrickColor = BrickColor.new(5,0,5);

character.Humanoid.HeadScale.Value = 3
character.Head.face.Texture = "http://www.roblox.com/asset/?id=1065070091"
local smoke = Instance.new("Smoke",character.Head);
smoke.Color = Color3.new(5,0,5)

2 comments

0

use local character = player.Character or player.CharacterAdded first of all

0

and make sure its a localscript

1 answer

If you intend to make something that alters any part of the character, you should add a Script in StarterCharacterScripts. This was your only error.

Instead of a LocalScript in StarterPack:

--localscript in starterpack

local player = game.Players.LocalPlayer
local character = player.Character

game.Workspace:WaitForChild(game.Players.LocalPlayer.Name)

character.Head.BrickColor = BrickColor.new(5,0,5);

character.Humanoid.HeadScale.Value = 3
character.Head.face.Texture = "http://www.roblox.com/asset/?id=1065070091"
local smoke = Instance.new("Smoke",character.Head);
smoke.Color = Color3.new(5,0,5)

You have a Script in StaterCharacterScripts:

--script in scs

local character = script.Parent --script is placed in character on play

character.Head.BrickColor = BrickColor.new(Color3.new(5, 0, 5)) --what an odd color

character.Humanoid.HeadScale.Value = 3
character.Head.face.Texture = "rbxassetid://1065070091"

local smoke = Instance.new("Smoke",character.Head);
smoke.Color = Color3.new(5,0,5) --what an odd color

This discussion is preserved as it was. New answers, comments, and votes are closed.