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

i am trying to make tool were the ball goes but it wont go how do i fix?

Asked by 5 years ago

this is a remote script

local on = true
local size = .1
local ammo = 6

script.Parent.make.OnServerEvent:Connect(function(player)
        local mouse = player:GetMouse()

    --all part-------------------------------
        local x = Instance.new("Part",player.Character.Head)
        x.Position = script.Parent.asd.Position
        x.Name = "x"
        x.CanCollide = true
        x.Anchored = true
        x.Shape = "Ball"
        x.Transparency = .5
        x.BackSurface = "Smooth"
        x.TopSurface = "Smooth"
        x.BottomSurface = "Smooth"
        x.BrickColor = BrickColor.new("Brown")
        x.Size = Vector3.new(0.83, 0.83, 0.83)
        x.CanCollide = false
        --------------------------
        while on == true do
            wait()
         x.Size = x.Size + Vector3.new(size,size,size)


        end




end)



script.Parent.fire.OnServerEvent:Connect(function(player)
    local mouse = player:GetMouse()
    local x = player.Character.Head.x

        local u = Instance.new("BodyVelocity",x)
        u.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
        x.Anchored = false
        u.Velocity = mouse.Hit.Position 
        x.Parent = workspace
    on = false
    ammo = -3
    wait(2)
    on = true

end)

script.Parent.Activated:Connect(function() script.Parent.make:FireServer() end) script.Parent.Deactivated:Connect(function() script.Parent.fire:FireServer() end)
0
You can't fireserver in a server script. You need a LocalScript to do so mixgingengerina10 223 — 5y
0
i know i have a a local script fireing sver helleric -3 — 5y
0
GetMouse cannot be called from the server. User#19524 175 — 5y
0
were can it be called from then helleric -3 — 5y
View all comments (2 more)
0
LocalScripts mixgingengerina10 223 — 5y
0
how thou helleric -3 — 5y

Answer this question