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

How to make this script show and make more surface guis?

Asked by 7 years ago
Edited 7 years ago

what im trying to do is :

i have a part (thats gonna be a character later)

I'm trying to make surface guis go on the bricks under the character that it can be moved to when clicked

im having trouble making the surface gui show under the part and 3 - 9 blocks away depending on the move stat of the part

right now it's only show one surface gui (not under the brick)

local player = game.Players.LocalPlayer
local char = game.Workspace.Part
local selection = Instance.new("SelectionBox", player.PlayerGui)
local children = game.workspace.Map:GetChildren()

selection.Color3 = Color3.new(0.6,0.6,0,6)

local clone = selection:Clone()
clone.Color3 = Color3.new(0.9,0.9,0.9)

for i = 1, #children do
   if char.Move.Value >= 3 and char.Move.Value <= 10 then
            selection.Adornee = children[i]
                i = i + 1
end
   end

Answer this question