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

starterpack script not working on server, why?

Asked by 6 years ago

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)
0
use `local character = player.Character or player.CharacterAdded` first of all iddash 45 — 6y
0
and make sure its a localscript iddash 45 — 6y

1 answer

Log in to vote
0
Answered by
y3_th 176
6 years ago

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
Ad

Answer this question