player = script.Parent.Parent
thrust = game.ReplicatedStorage.BodyThrust
force = game.ReplicatedStorage.BodyForce
f = force:Clone()
f.Parent = player.Character.Head
while true do
locationX = player.Character.Head.Position.X
locationY = player.Character.Head.Position.Y
locationZ = player.Character.Head.Position.Z
m = Instance.new("Part")
m.Shape = "Ball"
m.Size = Vector3.new(1,1,1)
m.CanCollide = false
t = thrust:Clone()
t.Parent = m
m.Parent = game.Workspace
m.BrickColor = BrickColor.new("Brown")
m.CFrame = CFrame.new(locationX, locationY - 3 , locationZ)
game:GetService("Debris"):AddItem(m, 5)
wait(.05)
end
This is my script, the issue is, that it works entirely fine in play solo, but doesn't work at all in online mode. The error I get is: 11:41:29.475 - Players.Player1.PlayerGui.LocalScript:7: attempt to index field 'Character' (a nil value) 11:41:29.475 - Script 'Players.Player1.PlayerGui.LocalScript', Line 7
