what i am trying to do is everytime you press "r" then a fireball comes out, and a dialogue interface comes out of the head that says "Fireball!" and then destroys after 4 seconds. also the rotation of the fireball is really off
player = script.Parent.Parent mouse = player:GetMouse() char = player.Character fireballText = "Fireball!" function onKeyDown(key) key = key:lower() if key == "r" then head = player.Character:FindFirstChild("Head") fireball = game.Lighting.fireball:clone() fireball.Parent = game.Workspace fireball.CFrame = char.Torso.CFrame.lookVector*CFrame.new(8,0,0) fireball.Name = "fireballClone" fireball.Velocity = head.CFrame.lookVector*0 game.GetService("Chat"):Chat(head, fireballText, "Bright red") wait(2) game.GetService("Chat"):Destroy() end end mouse.KeyDown:connect(onKeyDown)
For line(s) 16-18
game:GetService('Chat'):Chat(head,'FIREBALL!','Red')
Also
You cant remove the Chat it goes away just as any of the Chat bar(s) above our heads today.
Do NOT use
game:GetService('Chat'):Destory() <--- ERROR