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)


	

6 comments

0

You can't fireserver in a server script. You need a LocalScript to do so

0

i know i have a a local script fireing sver

0

GetMouse cannot be called from the server.

0

were can it be called from then

0

LocalScripts

0

how thou