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

here is sever script for the fire ball and local script. it show on stuido but not in game idk why?

Asked by 5 years ago
local Tool = script.Parent play = Tool.Parent.Parent char = play.Character hum = char.Humanoid root = char.HumanoidRootPart

local en = true

Tool.RemoteEvent.OnServerEvent:connect(function(play,mousehit) local a = hum:LoadAnimation(Tool.Throw) a:Play() root.CFrame = CFrame.new(root.Position,root.Position + Vector3.new(mousehit.lookVector.x,0,mousehit.lookVector.z)) wait(0.1) local fireball = Tool.Handle:clone() fireball.CFrame = Tool.Handle.CFrame local bv = Instance.new("BodyVelocity") bv.MaxForce = Vector3.new(1e8,1e8,1e8) bv.Velocity = mousehit.lookVector * 50 bv.Parent = fireball fireball.CanCollide = false fireball.Parent = game.Workspace game.Debris:AddItem(fireball,4) local ten = true fireball.Touched:connect(function(hit) if not ten then return end ten = false local ehum = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid") if ehum and ehum ~= hum then ehum:TakeDamage(40) elseif hit.Anchored == true and hit.CanCollide == true then

end ten = true end) end) -------------------------------------------------------------------------------------------------------------------------------the lcoal script:

local Tool = script.Parent play = game.Players.LocalPlayer local mouse = play:GetMouse() local char = play.Character hum = char.Humanoid root = char.HumanoidRootPart

local en = true Tool.Activated:connect(function() if not en then return end en = false Tool.RemoteEvent:FireServer(mouse.Hit) wait(0.5) en = true end)
0
what the heck happened INOOBE_YT 387 — 5y
0
it works in stouido helleric -3 — 5y
0
Is that a Local herrtt 387 — 5y
0
I have no idea Why it doesnt create the fireball, add some prints then check the output in game herrtt 387 — 5y

Answer this question