is there a way to have multiple Step
Parameters?
I want it to work for the players and any part/model as well.
unfortunately it’s not set up to work with multiple positions. what you could do is have multiple overlayed distancefade objects each with a different target position, though it might not have the intended effect
Thank you! You’re right, a much better version could be done with editableimages (I didn’t know about them when I made the module lol). Unfortunately I’m really busy with other projects and don’t really have the time to update it right now, but maybe down the line?
thanks! which folder are you talking about?
Sorry, I forgot to mention!
I’m using the HexagonBarrier template, I meant getting the children of the Model that all the parts are parented to so they don’t have to be individually listed in the script.
I’ve made a working prototype which implements parallax mapping to add a couple more options to the module, including a positional offset. And it looks pretty cool.
The download for the additions I made:
DistanceFadeParallax.rbxm (18.0 KB)
DistanceFadeHexagonParallax.rbxm (25.2 KB)
SO COOL!! i’ll link it in the post
The way the module’s set up AddFace needs to be called for each part, so you need to loop through the children to add them. You could make a function to simplify the process
local function AddFaces(model)
for _,d in model:GetDescendants() do
if d:IsA("BasePart") then distanceFade:AddFace(d, Enum.NormalId.Front) end
end
end
Also in the hexagon template, each face has a different horizontal texture offset applied to it to make the texture seamless, which is why they’re listed out like that
could you make it work for multiple instances?
you mean have multiple Runservice
for different instances?
Hey, the hexagon module literally just doesn’t work for me. The local script is in StarterPlayerScripts with the module inside it, and the BorderObject is just a union in a series of folders in workspace. For some reason the module just doesn’t work at all. What did I do wrong?
I forgot the script:
local DistanceFade = require(script.DistanceFade)
local ForcefieldObject = DistanceFade.new()
local BorderObject = game.Workspace.MapObjects.Forest.Misc:WaitForChild("WorldBorder", 5)
local ForcefieldSettings = {
["DistanceOuter"] = 36,
["DistanceInner"] = 4,
["EffectRadius"] = 20,
["EffectRadiusMin"] = 16,
["EdgeDistanceCalculations"] = true,
["Texture"] = "rbxassetid://18852397345",
["TextureTransparency"] = 0.65,
["BackgroundTransparency"] = 0.9,
["TextureColor"] = Color3.fromRGB(255, 0, 4),
["BackgroundColor"] = Color3.fromRGB(255, 0, 4),
["TextureSize"] = Vector2.new(20, 16),
["TextureOffset"] = Vector2.new(10, 4),
["Brightness"] = 3,
}
ForcefieldObject:UpdateSettings(ForcefieldSettings)
ForcefieldObject:AddFace(BorderObject, Enum.NormalId.Front)
ForcefieldObject:AddFace(BorderObject, Enum.NormalId.Back)
ForcefieldObject:AddFace(BorderObject, Enum.NormalId.Left)
ForcefieldObject:AddFace(BorderObject, Enum.NormalId.Right)
game:GetService("RunService").Heartbeat:Connect(function()
local TargetPosition
ForcefieldObject:Step(TargetPosition)
end)
it has to be a script w/ the Client
on the RunContext
That’s what is shows for me.
does the Parent need to be Workspace?
What do you mean does the parent need to be workspace
Mine’s in StarterPlayerScripts. Does it have to be in workspace?
I’m pretty sure I did everything right and it just doesn’t work. It somehow worked on the preset with the square texture but this preset doesn’t
did you try using the hex model he provided?
Yup, that didn’t work either. (chars chars)