Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Broken GUI Cameras?

Asked by 10 years ago

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!
0
Seat Camera? Tkdriverx 514 — 10y
0
I recommend making this a LocalScript and putting in 'game.Players.LocalPlayer Shawnyg 4330 — 10y

1 answer

Log in to vote
0
Answered by
xp3000 0
10 years ago

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!

0
Uh... Can you edit that please? xD ScriptingHelpersALT 20 — 10y
Ad

Answer this question