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

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

Asked by 4 years ago

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

0
Sorry but this is not a request site. You have to give us code you tried so we can work with something U_srname 152 — 4y
0
Just set the players camera to the part. SmartNode 383 — 4y
0
Not that easy @SmartNode. DeceptiveCaster 3761 — 4y

1 answer

Log in to vote
1
Answered by
sheepposu 561 Moderation Voter
4 years ago
Edited 4 years ago

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

0
Wow, that was a bit rude. UnitedGateCompany 18 — 4y
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. Psudar 882 — 4y
Ad

Answer this question