Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Hi how would I fix this error, I'm not sure how to incorporate hrp in my cframes effectively?

Asked by 2 years ago
Edited by Xapelize 2 years ago
local nyaa = game:GetService("Players")
local NY = nyaa.Player
local nya = NY.Character
if not nya or not nya.Parent then
    nya = NY.CharacterAdded:wait()
end
hrp = nya:FindFirstChild("HumanoidRootPart")
game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(player)
    game.Workspace.tae.CFrame = CFrame.new(game.Workspace.tae.Position, hrp.position)
end)

keep getting the error Player is not a valid member of Players "Players". Thank you in advance for the help.

0
nya also guys it's a server script because he used OnServerEvent Xapelize 2658 — 2y
0
people like him at first dont understand that you cant get the "LocalPlayer" on the server because it hosts all the players. nyaa.Player doesn't exist. greatneil80 2647 — 2y
0
We've all been in that place before. ISkyLordDoge 37 — 2y

Answer this question