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

Can you fix it?

Asked by 8 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

First of all for some odd reason this tool is no longer working: Can you fix it?

local bin = script.Parent 
bin.Selected:connect(function(Mouse)
 Mouse.Button1Down:connect(function()
    local xorgin = Mouse.Origin.x
    local yorgin = Mouse.Origin.y
    local player = game.Players.LocalPlayer
  Instance.new('Part', game.Workspace)
game.Workspace.Part.CFrame = CFrame.new(Mouse.hit.p.x,Mouse.hit.p.y,Mouse.hit.p.z)
game.Workspace.Part.Name = player.Name..'FigurePart'
game.Workspace[player.Name..'FigurePart'].Transparency = 1
 end)
end)

and then there's this script that fails attaching the camera to it.

script.Parent.MouseButton1Down:connect(function()
    local player = game.Players.LocalPlayer
    script.Parent.Visible = false
    script.Parent.Parent.MiniGuiFolder["<"].Visible = false
    script.Parent.Parent.MiniGuiFolder[">"].Visible = false
    script.Parent.Parent.MiniGuiFolder.Frame.Visible = false
    game.Workspace[player.Name..'Figure'].Humanoid.Health = 100
        game.Workspace[player.Name..'Figure'].Humanoid.MaxHealth = 100
    wait(0.3)
local target = workspace[player.Name.."Figure"].Torso
local camera = workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Scriptable
camera.CameraSubject = target

while wait() do
    camera.CoordinateFrame = CFrame.new(target.Position)
                           * CFrame.Angles(-95, 0, 0) 
                           * CFrame.new(0, 0, 25)
end
end)
0
Can we fix it? Yes, we can! But first, edit your question with any errors that are shown in the output, if any. Pyrondon 2089 — 8y
0
Ok 2sp00ky4y0u 2 — 8y
0
Players.2sp00ky4y0u.PlayerGui.MiniGui.Play.Script:7: attempt to index local 'player' (a nil value) 2sp00ky4y0u 2 — 8y
0
That is referring to which script? The second one? Pyrondon 2089 — 8y
View all comments (3 more)
0
The 2nd one in the post 2sp00ky4y0u 2 — 8y
0
Just found out I needed it to be a localscript, but now it creates another part and sometimes walks to that one? 2sp00ky4y0u 2 — 8y
0
Make your title better, Its nonconstructive. Conmmander 479 — 8y

1 answer

Log in to vote
-4
Answered by 8 years ago

Sorry im new

0
A few tips. First off, never post an answer that should be a comment, this is an example. Second, we need more details then what you have offered us, and the title needs to be changed to something relevant to your error, not just "Can you fix it?" Async_io 908 — 8y
Ad

Answer this question