I have been baffled by this for a week by now. I have been trying to make a text button on a GUI to work. There isn't any issue as far as I can see, and cross referencing with the wiki's hasn't helped. The button is supposed to make the camera follow a separate block. Although the camera code works the button hasn't worked once. Any Help is appreciated, thanks.
local Button = WOORK -- Button name
function Onclick(part)
local target = Workspace.BattleShip.BCameraBlock-- Beginning working part of camera
local camera = Workspace.CurrentCamera
camera.CameraType = "Follow"
camera.CameraSubject = target
camera.CameraMinZoomDistance= 5
Camera.CameraMaxZoomDistance= 10 -- end of working part of camera
end
Onclick(Button.MouseButton1Click)

1 comment
This helped a lot! thanks.