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

No output, no action, why?

Asked by
ItsMeKlc 235 Moderation Voter
8 years ago

This script I made does NOTHING, no errors, no output, no anything... Why? This is inside a local script in a tool

local eopen = false
local mouse = game.Players.LocalPlayer:GetMouse()
eopen = false



script.Parent.Unequipped:connect(function()
    print("a")
    eopen = false
end)
script.Parent.Equipped:connect(function()
    print("a")
    eopen = true
    while eopen == true do
        wait()
        local MP = game.Workspace.Camera.CoordinateFrame.lookVector.y*5
        if MP<-3 then
            MP = -3
        end
        if script.Parent.Parent:FindFirstChild("HumanoidRootPart") then
            script.Parent.Part.CFrame = script.Parent.Parent:FindFirstChild("HumanoidRootPart").CFrame+script.Parent.Parent:FindFirstChild("HumanoidRootPart").CFrame.lookVector*5 --CFrame.new(script.Parent.Parent:WaitForChild("HumanoidRootPart").Angles+math.floor(script.Parent.Parent:WaitForChild("HumanoidRootPart").CFrame.X),math.floor(script.Parent.Parent:WaitForChild("HumanoidRootPart").CFrame.Y),math.floor(script.Parent.Parent:WaitForChild("HumanoidRootPart").CFrame.Z))+
            script.Parent.Part.CFrame = CFrame.new(math.floor(script.Parent.Part.CFrame.X),math.floor(script.Parent.Part.CFrame.Y+MP),math.floor(script.Parent.Part.CFrame.Z))
            script.Parent.Part.Rotation = Vector3.new((script.Parent.Parent:FindFirstChild("HumanoidRootPart").Rotation.X),floor5(script.Parent.Parent:FindFirstChild("HumanoidRootPart").Rotation.Y),(script.Parent.Parent:FindFirstChild("HumanoidRootPart").Rotation.Z))
        end
    end
end)

function floor5(n)
    return (math.floor(n/15+.5)*15)
end

function place()
    eopen = false
    wait(0.05)
end

1
Could you edit your post to provide a little more context? What's supposed to happen? What type of tool is this? What's the logic behind the code? Thanks! nicemike40 486 — 8y

Answer this question