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

Why does this script keep saying "Failed to upindex 'player' "?

Asked by
Prioxis 673 Moderation Voter
9 years ago

So my script that is suppose to teleport the player to the position shown in the script but for some reason it just won't do so it keeps hitting this error "Failed to upindex 'player' " I've tried rewriting it to what is in the script now

local player = game.Players.LocalPlayer
local pos = -215, 3, -14
wait(5)
script.Parent.Visible = true
script.Parent.MouseButton1Down:connect(function(click)
    script.Parent.Parent.Parent:Destroy()
    game.Players.LocalPlayer.Character.Torso.CFrame = CFrame.new(-215, 3, -14) -- local player instead of using the player value
end)
1
Did you make sure it's a local script? And if so, is Filtering Enabled? BobserLuck 367 — 9y
0
Thank you so much! :) I can't believe I didn't try that Prioxis 673 — 9y

Answer this question