Been trying to figure this out all day, it doesn't seem to be working,
It used to work yesterday, before todays update..
It still works on solo
Sword = game.Lighting.Sword player = game.Players.LocalPlayer game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) Sword:Clone().Parent = player.Character end) end)
You shouldn't be using a PlayerAdded
event inside of a localscript - localscripts should only be on places replicates to the client e.g. StarterGui, StarterPack, etc..
So, to fix? Make this a server script, put it in workspace, remove the 'player' variable on line 2
, and finally use the player parameter returned from your PlayerAdded event for the definition of the player.
local Sword = game.Lighting.Sword game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) Sword:Clone().Parent = character end) end)