Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Broken GUI Cameras?

You know the Seat Camera's? I'm trying to make a GUI Version for it. I did pretty good, but stuck here. Basically, I want the Camera so when you click on the Button, it shows the Controls for the camera, like the Seat one. It get's to line 17.

script.Parent.Camera.Disabled = false

script.Parent.MouseButton1Click:connect(function()
	if (script.Parent.Parent.Parent.Parent.Character:FindFirstChild("Humanoid") ~= nil) then
		wait()
		if (script.Parent.Parent.Parent.Parent.Character:FindFirstChild("Humanoid").Sit == false) then
                        script.Parent.MaxNumber.Value = 0
                        c = game.Workspace:GetChildren()
                        for i =1,#c do
                        if (c[i]:FindFirstChild("SBCameraMesh") ~= nil) then
                        script.Parent.MaxNumber.Value = script.Parent.MaxNumber.Value + 1
                        c[i].Name = "CameraType"..script.Parent.MaxNumber.Value
                        end
                        end
                        game.Players:GetPlayerFromCharacter(script.Parent.Parent.Parent.Parent).Character.Parent = script.Parent.Parent
			LocalScript = script.Parent.Camera:Clone()
			LocalScript.Parent = game.Players:GetPlayerFromCharacter(script.Parent.Parent.Parent.Parent).Backpack
			GUI = game.ServerStorage.Camera:Clone()
                        if game.Players:GetPlayerFromCharacter(script.Parent.Parent.Parent.Parent).PlayerGui:findFirstChild(GUI.Name) ~= nil then return end
                        script.Parent.MaxNumber:clone().Parent = GUI
			GUI.Parent = game.Players:GetPlayerFromCharacter(script.Parent.Parent.Parent.Parent).PlayerGui
		end

	end
end)

--Created by Starbattle!

2 comments

0

Seat Camera?

0

I recommend making this a LocalScript and putting in 'game.Players.LocalPlayer

1 answer

Fixed.

script.Parent.Camera.Disabled = false --02

--03 script.Parent.MouseButton1Click:connect(function() --04 if (script.Parent.Parent.Parent.Parent.Character:FindFirstChild("Humanoid") ~= nil) then --05 wait() --06 if (script.Parent.Parent.Parent.Parent.Character:FindFirstChild("Humanoid").Sit == false) then --07 script.Parent.MaxNumber.Value = 0

                    c = game.Workspace:GetChildren()

--09 for i =1,#c do --10 if (c[i]:FindFirstChild("SBCameraMesh") ~= nil) then --11 script.Parent.MaxNumber.Value = script.Parent.MaxNumber.Value + 1 --12 c[i].Name = "CameraType"..script.Parent.MaxNumber.Value 13 end 14 end 15 game.Players:GetPlayerFromCharacter(script.Parent.Parent.Parent.Parent).Character.Parent = script.Parent.Parent 16 LocalScript = script.Parent.Camera:Clone() --17 LocalScript.Parent = game.Players:GetPlayerFromCharacter(script.Parent.Parent.Parent.Parent).Backpack --18 GUI = game.ServerStorage.Camera:Clone() --19 if game.Players:GetPlayerFromCharacter(script.Parent.Parent.Parent.Parent).PlayerGui:findFirstChild(GUI.Name) ~= nil then return end

                    script.Parent.MaxNumber:clone().Parent = GUI

        GUI.Parent = game.Players:GetPlayerFromCharacter(script.Parent.Parent.Parent.Parent).PlayerGui   

end

end)

--Created by xp3000!

1 comment

0

Uh... Can you edit that please? xD

This discussion is preserved as it was. New answers, comments, and votes are closed.