Hello, my question is in title. I'm trying to change players apperance, but it works only in Starter Character Scripts and as a local script ;/ I tried to make it as a normal script and placed it in ServerScriptService, but don't work at all.

Here is script:

local Player = game.Players.LocalPlayer
local playerCharacter = Player.Character

if Player ~= nil then
	local plrStats = game.ReplicatedStorage.PlayerStorage:WaitForChild(Player.Name):WaitForChild("Points")
	local PlayerGui = Player:FindFirstChild("PlayerGui")
	local DuckName = PlayerGui.DuckGui.CurrentDuck
	local playerBP = Player:FindFirstChild("Backpack")
	local Tool = playerBP:FindFirstChild("Duck")
	local levelUpParticle = game.ReplicatedStorage.Particles.LevelUp:Clone()
	local particleFolder = game.ReplicatedStorage.Particles
	if playerCharacter then
		---Body Transparency----
		playerCharacter.Head.Transparency = 1
		playerCharacter:findFirstChild("Left Arm").Transparency = 1
		playerCharacter:findFirstChild("Left Leg").Transparency = 1
		playerCharacter:findFirstChild("Right Arm").Transparency = 1
		playerCharacter:findFirstChild("Right Leg").Transparency = 1
		playerCharacter.Torso.Transparency = 1
		playerCharacter.Head.face:Remove()
		---Duck---
		local RootPart = playerCharacter:findFirstChild("HumanoidRootPart")
		local bellyMain = Instance.new("Part", RootPart)
		bellyMain.Name = "Handle"
		local bellyWeld = Instance.new("Weld", bellyMain)
		bellyWeld.Part0 = bellyMain
		bellyWeld.Part1 = RootPart
		local mesh = Instance.new("SpecialMesh", bellyMain)
		mesh.MeshType = "FileMesh"
		mesh.MeshId = "rbxassetid://9419831"
		mesh.TextureId = "rbxassetid://9419827"
		mesh.Scale = Vector3.new(5,5,5)
		mesh.Offset = Vector3.new(0, -0.5, 0)
	end
end

3 comments

0

You can't reference local player in a script

0

LocalPlayer cannot be used by ServerScripts. Why would you want to change the script type anyways?

0

I want to change it, because you can't update this script during game.