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

How to make a invisible block?

Asked by 9 years ago

like leaving a visible block only for a person? , Example: has a block on top of my head but I can only see, other players not

0
You could place the Part in the Player's 'CurrentCamera'. http://wiki.roblox.com/index.php?title=CurrentCamera TheeDeathCaster 2368 — 9y
0
You can also create local parts by using FilteringEnabled and creating a part in a localscript. NotsoPenguin 705 — 9y

2 answers

Log in to vote
0
Answered by
Emg14 10
9 years ago
--[[
    Test Place:
        Workspace
            Script
                Local Script
        -   -   -
        -   -
        -

    In Server 2 Players:
        Server=
            Workspace
                Script
            Players
                Player1
                    Backpack
                    PlayerGui
                        Local Script
                    StarterGear
                Player2
                    Backpack
                    PlayerGui
                    StarterGear
            NetworkServer
                ...

        Player1 sees=
            Workspace
                Script
                Part
            Players
                Player1
                    Backpack
                    PlayerGui
                        Local Script
                    StarterGear
                Player2
                    Backpack
                    PlayerGui
                    StarterGear

        Player2 sees=
            Workspace
                Script
            Players
                Player1
                    Backpack
                    PlayerGui
                        Local Script
                    StarterGear
                Player2
                    Backpack
                    PlayerGui
                    StarterGear

--]]

-- File:Script in workspace
game.Players.PlayerAdded:connect(function(Player)
    if Player.Name == 'Player1' or 'Player' then --Check for specific Player
        Player.CharacterAdded:connect(function() --Make sure there is a character
            script.LocalScript.Parent = Player.PlayerGui --Execute Script
        end)
    end
end)

--File:Local Script in Script /\
local CurrentCamera = game.Workspace.CurrentCamera -- Get Camera
local Part = Instance.new('Part') --Do not parent yet

--Make the part stuff...
Part.Name = 'Invisible Part'
Part.Position = game.Workspace:WaitForChild(script.Parent.Parent.Name).Head.Position + Vector3.new(0,2,0)
Part.Size = Vector3.new(2,2,2)

wait(2) -- A little timeout eh?
Part.Parent = CurrentCamera --Parent to Current Camera to become an official Local Part
0
This needs an explanation in english. The comments in the code are hard to read and slightly confusing. NotsoPenguin 705 — 9y
0
Wow thx for the help its working 12345gabriel12345 15 — 9y
Ad
Log in to vote
0
Answered by
iaz3 190
9 years ago

What you want are Local Parts

I won't go into much detail, because the wiki explains it well enough and provides examples

Answer this question