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

Can you fix it?

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)

7 comments

0

Can we fix it? Yes, we can! But first, edit your question with any errors that are shown in the output, if any.

0

Ok

0

Players.2sp00ky4y0u.PlayerGui.MiniGui.Play.Script:7: attempt to index local 'player' (a nil value)

0

That is referring to which script? The second one?

0

The 2nd one in the post

0

Just found out I needed it to be a localscript, but now it creates another part and sometimes walks to that one?

0

Make your title better, Its nonconstructive.

1 answer

Sorry im new

1 comment

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?"

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