You can write your topic however you want, but you need to answer these questions:
- What do you want to achieve? Keep it simple and clear!
I have a script that should make the mesh tornado transparent when you are close, but it does not do that.
- What is the issue? Include screenshots / videos if possible!
The Script:
local humanoidRootPart = game.Players.LocalPlayer.HumanoidRootPart
local modelPrimaryPart = workspace.Tornado.PrimaryPart
local meshTornado = workspace.Tornado.Tornado.Main.distrender
local function GetDistance(p1,p2)
local Distance = (p1.Position - p2.Position).magnitude
return Distance
end
while true do
task.wait(1)
if GetDistance(modelPrimaryPart, humanoidRootPart) > 500 then
meshTornado["distrenderTor 1"].Transparency = 0
meshTornado["distrenderTor 2"].Transparency = 0.5
meshTornado["disrenderTor 3"].Transparency = 0.7
elseif GetDistance(modelPrimaryPart, humanoidRootPart) < 500 then
meshTornado["distrenderTor 1"].Transparency = 1
meshTornado["distrenderTor 2"].Transparency = 1
meshTornado["disrenderTor 3"].Transparency = 1
end
end
- What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I have tried rewriting it a few times, but this script was originally a solution to someone else’s topic and I just changed the function.