Hello, so i have a problem in this script. When player joining its not cloning into head
local plr = game:GetService("Players").LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local head = char:WaitForChild("Head")
local item1 = game.ReplicatedStorage:WaitForChild("dismembered"):Clone()
item1.Parent = head
local item2 = game.ReplicatedStorage:WaitForChild("pain"):Clone()
item2.Parent = head
local item3 = game.ReplicatedStorage:WaitForChild("BrutalizedPE"):Clone()
item3.Parent = head
also sorry for my bad eng
Is this a Script or a LocalScript?
this is local scriiiiiiiiiiiiipt
Does it prints put any errors? (look in the output)
nothing, but it clone only while testing(in studio)
Are you sure that it clones in studio only?
yes, i test it with local server in studio with 2 players and it didnt clone
Maybe use Script and use PlayerAdded event instead of LocalPlayer?
i’ve tried it too, not worked (sadly)
It should have worked according to what you say.
Where is the local script located?
I tried it from both script and local script and it worked for me.
Here is my (server)script(located in server script service):
1 Like
local script is in character scripts, idk why it dont want work for me normally
Create a script and place it inside of ServerScriptService and put this code inside:
local players = game:GetService("Players")
local replicatedstorage = game:GetService("ReplicatedStorage")
players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
local head = character:WaitForChild("Head")
local item1 = replicatedstorage:WaitForChild("dismembered"):Clone()
item1.Parent = head
local item2 = replicatedstorage:WaitForChild("pain"):Clone()
item2.Parent = head
local item3 = replicatedstorage:WaitForChild("BrutalizedPE"):Clone()
item3.Parent = head
end)
end)
1 Like
Because you use localscript, it didn’t replicated to all players
1 Like