I'm attempting to make a game based on the Eastern Front, so I'm making a shovel that will allow you to dig out trenches, foxholes, ditches, etc. However, my code is not working.
The explosion just keeps inserting at the center of the map, and nowhere else.
Please Help!
Client Script:
local plr = game.Players.LocalPlayer local mouse = plr:GetMouse() local mouseHit = mouse.Hit.p script.Parent.Activated:Connect(function() game.ReplicatedStorage.DigTerrain:FireServer(mouseHit) end)
Server Script:
--/ Explosion Variables \-- local ex = Instance.new("Explosion") ex.ExplosionType = Enum.ExplosionType.Craters ex.BlastPressure = 100 ex.DestroyJointRadiusPercent = 0 ex.Visible = false ex.BlastRadius = 10 local debounce = false --/ Main Function \-- game.ReplicatedStorage.DigTerrain.OnServerEvent:Connect(function(plr, mouseTarget) if debounce == false then debounce = true local exClone = ex:Clone() exClone.Position = mouseTarget exClone.Parent = workspace wait(0.5) debounce = false end end)