Players.julienblox123b.PlayerGui.ScreenGui.IntroFrame.PlayButton.PlayClient:8: attempt to call a nil value
can someone help me fix this?
Script:
-- Variables for the script to think that these locals are useful
local camera = workspace.CurrentCamera
local mainMenuMap = workspace:WaitForChild("MainMenuMap")
local tweenService = game:GetService("TweenService")
local btn = script.Parent
function tweenCamera(pos, tweenTime)
tweenService:Create(camera,TweenInfo.New(tweenTime,Enum.EasingStyle.Linear),{CFrame = pos.CFrame}):Play()
end
btn.MouseButton1Click:Connect(function()
btn.Visible = false
btn.Parent.Title.Visible = false
tweenCamera(mainMenuMap.CameraPart2,1)
wait(1)
print("Reached Destination")
end)

1 comment
mark it as solved