Code works in a server script but doesn't work on a local script?
Hello, I am currently trying to get some code to work client-sided. However, nothing happens in a local script and I'm not sure why.
My code:
01 | local eggs = game.ReplicatedStorage.Eggs |
03 | local spawns = game.Workspace.EggSpawns |
05 | local spawn = spawns.EoTS |
07 | local eots = eggs [ "Egg of True Skill" ] |
09 | local eggClone = eots:Clone() |
10 | eggClone.Parent = game.Workspace.SpawnedEggs |
12 | eggClone.Position = spawn.Position + Vector 3. new( 0 , 0.5 , 0 ) |
13 | eggClone.Anchored = false |
15 | eggClone.Touched:Connect( function (hit) |
16 | local plr = game.Players:GetPlayerFromCharacter(hit.Parent) |
19 | game.ReplicatedStorage.FoundEgg:FireClient(plr,eggClone.Name) |