想简单测试计算一下一个玩家相对某物体的距离
在StarterPlayerScript下面创建了一个local Script,然后这样写:
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local pos = character.PrimaryPart.Position
print(pos)
发现报空了,请问应该怎么获取啊?