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
COMMUNITY QUESTION
How do u make a players camera look inside of a block when u touch a brick?
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.

3 comments
Sorry but this is not a request site. You have to give us code you tried so we can work with something
Just set the players camera to the part.
Not that easy @SmartNode.