Alright so im trying to make a gui thing where you click and it takes you to a parts cframe. simple. but apparently im doing something wrong. heres my code:
local player = game.Players.LocalPlayer
local booth = workspace:WaitForChild('Booth')
local boothTel = booth.BoothTeleport
script.Parent.Activated:Connect(function()
if player then
workspace[player.Name].HumanoidRootPart.CFrame = boothTel.CFrame
player.PlayerGui.BuyBooth.Enabled = false
end
end)
BuyBooth is a GUI, the booth variable is a model, and boothTel is the teleport part(where people will be teleported to)

2 comments
Is it a LocalScript?
yes