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

How do I do this when the mouse has already hovered off of the model?

Asked by 3 years ago
local Mouse = game:WaitForChild("Players").LocalPlayer:GetMouse()

while wait() do
    if Mouse.Target and Mouse.Target.Parent then
        if Mouse.Target.Parent.Parent == game.Workspace.Towers then
    if Mouse.Target.Parent:FindFirstChild("Range") then
        Mouse.Target.Parent.Range.Size = Vector3.new(0.05, 16.85, 17)
            Mouse.Target.Parent.Range.Transparency = 0.3

        else

                Mouse.Target.Parent.Range.Transparency = 1
                Mouse.Target.Parent.Range.Size = Vector3.new(0.05, 1, 1)
        end
        end
        end
    end

So, I have this script here, but else doesnt work because the mouse is not hovering over the same thing, so it cant make the transparency of the "Range" part 1, Is there any way to fix this? I'm so confused

sorry if I didnt explain it well enough

Answer this question