So last time I posted about this, I spoke about the GUI Cloning issue. But this time, it's a different part of it. I have a brick that changes the players camera position. Which is here:
wait(0.03)
local player = game.Players.LocalPlayer
local camera = workspace.CurrentCamera
repeat wait(0.03) until player.Character
player.Character:Destroy()
camera.CameraType = "Scriptable"
camera.CoordinateFrame = game.Workspace.CameraFocusPart.CFrame
camera.Focus = game.Workspace.CameraFocusPart.CFrame
Now inside the GUI script that clones, I'm trying to make it change the position of the CameraFocus Part to a different position when I click on a location on the map. (So like a zoom in on the location). It doesn't seem to work and returns this error:
"19:34:50 -- Workspace.PlacePoints.arenapoint.Script:10: ')' expected near ',' "
Please help!
local points = game.Workspace.PlacePoints
local ui = game.ReplicatedStorage.AINFOUI
local newui = ui:Clone()
local uisound = game.ReplicatedStorage.AINFOUI.SOUNDS.clicksound
local cam = game.Workspace.CameraFocusPart
function onClicked(Player)
uisound:Play()
newui.Parent = Player.PlayerGui
game.Workspace.CameraFocusPart.CFrame.new = (189.468, 67.003, 95.912)
end
script.Parent.ClickDetector.MouseClick:Connect(onClicked)

6 comments
What that means is that CameraFocusPart is not in the workspace.
Is it inside of a model?
It's not, it's plain in workspace. Same name in all, even when I re-type it. It auto-corrects it to the part when I type "Workspace.cam"
Then something else is moving it lol
yeah probably being moved
There's no other script in the game "lol". Just the two in the post.