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

Script Doesn't Work?

Asked by
B3blx 5
8 years ago

A very outdated script that I bought off someone about 2 years ago. Want to re use it but can't work out whats wrong, it does not 'give' the player the GUI or the Camera

script.Parent.Camera.Disabled = false

script.Parent.Touched:connect(function(Part)
    if (Part.Parent:FindFirstChild("Humanoid") ~= nil) then
        wait()
        if (Part.Parent:FindFirstChild("Humanoid").Sit == true) then
                        script.Parent.MaxNumber.Value = 0
                        local 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(Part.Parent).Character.Parent = script.Parent.Parent
            local cam = script.Parent.Camera:Clone()
            cam.Parent = game.Players:GetPlayerFromCharacter(Part.Parent).Backpack
            local gui = script.Parent.ScreenGui:Clone()
                        if game.Players:GetPlayerFromCharacter(Part.Parent).PlayerGui:findFirstChild(gui.Name) ~= nil then return end
                        script.Parent.MaxNumber:clone().Parent = gui
            gui.Parent = game.Players:GetPlayerFromCharacter(Part.Parent).PlayerGui
        end

    end
end)
1
What are the errors, this isnt a request. User#5978 25 — 8y
0
If it isn't copying those objects then it doesn't contain those objects. It needs those objects. Put those objects back in it. 1waffle1 2908 — 8y

Answer this question