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

How do u make a players camera look inside of a block when u touch a brick?

How do u make a players camera look inside of a block when u touch a brick And how do u make a leaderboard that when you click an item on the ground it gives u cash plz help

3 comments

0

Sorry but this is not a request site. You have to give us code you tried so we can work with something

0

Just set the players camera to the part.

0

Not that easy @SmartNode.

1 answer

You could something like this for looking inside a part

local mouse = game.Players.LocalPlayer:GetMouse()

mouse.Button1Down:Connect(function() --Mouse is clicked
	local part = mouse.Target --Get the current part the mouse is hovering over
	--Now learn camera Manipulation for the code here
	--Once you learn it, you can set the player's camera CFrame something like this
	CFrame.new(Vector3.new(part.X - part.Size.X/2, Part.Y - part.Size.Y/2, part.Z - part.Size.Z/2))
end)

For getting money when clicking on a part, make a part called "MoneyOnClick" and do this

game.Players.PlayerAdded:Connect(function(plr)
	local mouse = plr:GetMouse() --get the mouse
	
	mouse.Button1Down:Connect(function() --mouse is clicked
		if mouse.Target.Name == 'MoneyOnClick' then --If they clicked the "MoneyOnClick" part
			--Give player money
		end
	end)
end)

i can't give you the full code cause then there would be no point in helping you. Figure out the code and if you run into problems come back and we'll help you

2 comments

0

Wow, that was a bit rude.

0

@UnitedGateCompany , Not rude.... This isnt a request site. This guy is doing more than enough to help. He coulda just told the OP to screw off, lol.

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