Merged
Conversation
by 3nrk
Collaborator
|
I'm not excited about runService.RenderStepped:Connect(function(step)
local ray = Ray.new(camera.CFrame.Position, Vector3.new(0, bRayHeight, 0))
local hit = workspace:FindPartOnRayWithWhitelist(ray, {bZones})
if hit then
if hit.Name == "R" then
for _, v in bFolder.ButtonPlatforms:GetChildren() do
if v:IsA("BasePart") then
v.Material = Enum.Material.Concrete
if v:FindFirstChildWhichIsA("Decal") then
v:FindFirstChildWhichIsA("Decal").Transparency = 0.9
end
if v:FindFirstChildWhichIsA("SpecialMesh") then
v:FindFirstChildWhichIsA("SpecialMesh"):Destroy()
end
end
end
else
for _, v in bFolder.ButtonPlatforms:GetChildren() do
if v:IsA("BasePart") and v.Name == hit.Name then
v.Material = Enum.Material.ForceField
if not v:FindFirstChildWhichIsA("SpecialMesh") then
local mesh = Instance.new("SpecialMesh", v)
mesh.TextureId = "http://www.roblox.com/asset/?id=459487304"
mesh.VertexColor = Vector3.new(1, 0, 0)
mesh.Scale = Vector3.new(v.Size.X, v.Size.Y, v.Size.Z)
end
if v:FindFirstChildWhichIsA("Decal") then
v:FindFirstChildWhichIsA("Decal").Transparency = 1
end
elseif v:IsA("BasePart") and v.Name ~= hit.Name then
v.Material = Enum.Material.Concrete
if v:FindFirstChildWhichIsA("SpecialMesh") then
v:FindFirstChildWhichIsA("SpecialMesh"):Destroy()
end
if v:FindFirstChildWhichIsA("Decal") then
v:FindFirstChildWhichIsA("Decal").Transparency = 0.9
end
end
end
end
end
end)can this be baked down a little more so there's not loops going on every renderstepped? |
Collaborator
|
nvm that's bhop_quaint, this is uploaded 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
by 3nrk