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
Did you mean nyaa.LocalPlayer? MendozaHM3SBulldog 32 — 2y
0
yeah, the problem is it has to be localplayer like the other person said but next time can you use the code block feature to make it tidy AProgrammR 398 — 2y
0
fixed the code block here Xapelize 2658 — 2y

Answer this question