What do I want to achieve? For it to work after purchasing.
Missile.rbxm (12.3 KB)
Line 10 of local script Client
is waiting for an event that has already fired.
local character = player.CharacterAdded:Wait()
You should try to directly reference the character first. I like using Tool.Equipped
to track the character, but this would be the simplest solution:
local character = player.Character or player.CharacterAdded:Wait()
I also highly recommend storing your objects in a more appropriate container than Lighting
, i.e., ServerStorage
and ReplicatedStorage
. This will give you more control over client-server accessibility, and it will prevent code from running ahead of time.