So normally on ROBLOX you can just do
game.Players..ITEM.Text
etc..
For some reason this is not working, I tried something different but it won't work and nothing appears in "Output" The code is as followed.
local namelol = script.Parent.Parent.Name.Text local row = script.Parent.Parent.Row.Text local num = script.Parent.Parent.SeatNumber.Text script.Parent.MouseButton1Click:Connect(function() if row == "A" and num == 1 then game.Players.namelol.Character.HumanoidRootPart.CFrame = workspace.A_One.CFrame * CFrame.new(0, 3, 0) else if row == "A" and num == 2 then game.Players.namelol.Character.HumanoidRootPart.CFrame = workspace.A_Two.CFrame * CFrame.new(0, 3, 0) else if row == "A" and num == 3 then game.Players.namelol.Character.HumanoidRootPart.CFrame = workspace.A_Three.CFrame * CFrame.new(0, 3, 0) end end end end)
I do know how to script and all that but I can't find an object via something's text.
If you want to index objects w/ dynamic strings, then you can use FindFirstChild()
or square brackets [ ]
.
Ex:
game.Players:FindFirstChild(namelol).Character.HumanoidRootPart.CFrame game.Players[namelol].Character.HumanoidRootPart.CFrame
You're indexing the player's name the wrong way. Instead, you should use square parantheses [ ]. Like this:
game.Players[namelol].Character.HumanoidRootPart.CFrame = workspace.A_One.CFrame * CFrame.new(0, 3, 0)