|
| 11 May 2015 09:20 AM |
plr = script.Parent.Parent.Parent ms = plr:GetMouse() ms.KeyDown:connect(function(key) if key == "q" then local fireball = Instance.new("Part", game.Workspace) local fire = Instance.new("Fire", fireball) fire.Heat = 0 fire.Size = 14 fireball.Transparency = 0.5 fireball.Shape = "Ball" fireball.BrickColor = BrickColor.new("Bright orange") fireball.Size = Vector3.new(1,1,1) fireball.Position = script.Parent.Handle.Position fireball.CanCollide = false game.Lighting.Script:Clone().Parent = fireball fireball.Velocity = plr.Character["Head"].CFrame.lookVector*250 end end)
works in test mode but not in a server? |
|
|
| Report Abuse |
|
|
|
| 11 May 2015 09:30 AM |
| First off is it a local script? Secondly, you should really use UserInputService rather than Mouse.Keydown since it is deprecated. |
|
|
| Report Abuse |
|
|
|
| 11 May 2015 06:58 PM |
| no its not in a localscript, and how would that matter? |
|
|
| Report Abuse |
|
|
| |
|
|
| 11 May 2015 07:15 PM |
| thanks changing it to a localscript did absolutely nothing |
|
|
| Report Abuse |
|
|
|
| 11 May 2015 07:17 PM |
because it's broken
you're also using some deprecated crap instead of uis |
|
|
| Report Abuse |
|
|
|
| 11 May 2015 07:18 PM |
| how come it works in studio then? |
|
|
| Report Abuse |
|
|
|
| 11 May 2015 07:22 PM |
because it doesn't matter if you're using a localscript or serverscript in play solo mode
local script
plr=game.Players.LocalPlayer
function keyPressed(inputObject, gameProcessedEvent) if inputObject.KeyCode==Enum.KeyCode.Q then --if q key print("q was pressed!") end end
game:GetService("UserInputService").InputBegan:connect(keyPressed)
|
|
|
| Report Abuse |
|
|