generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

script does absolutely nothing

Previous Thread :: Next Thread 
awesome404 is not online. awesome404
Joined: 11 Jan 2009
Total Posts: 3601
29 Dec 2013 08:41 PM
when I replace Workspace.Camera with Workspace.Instance it works in offline mode, but this does not work online.




function weld(x, y)
local w = Instance.new("Weld")
w.Part0 = x
w.C0 = x.CFrame:inverse()
w.Part1 = y
w.C1 = y.CFrame:inverse()
w.Parent = y
end

function stab(player)
local character = player.Character
local torso = character.Torso
local rs = torso["Right Shoulder"]
local ls = torso["Left Shoulder"]
local dagger = game.Lighting.daggerHandle:clone()
dagger.Parent = character
dagger.CFrame = character["Right Arm"].CFrame * CFrame.Angles(2, 0, 0)
dagger.CFrame = dagger.CFrame - Vector3.new(0, 1, 0)
weld(character["Right Arm"], dagger)
local campos = Workspace.Camera.CoordinateFrame
local camsub = Workspace.Camera.CameraSubject
Workspace.Camera.CoordinateFrame = script.Parent.CFrame + Vector3.new(0, 0, 3)
Workspace.Camera.CameraSubject = script.Parent
for i = 1, 15 do
Workspace.Camera.CoordinateFrame = Workspace.Camera.CoordinateFrame + Vector3.new(.2, 0, 0)
rs.C0 = rs.C0 * CFrame.Angles(0, 0, 0.14)
rs.C0 = rs.C0 * CFrame.Angles(0, 0.1, 0)
ls.C0 = ls.C0 * CFrame.Angles(0, 0.1, 0)
ls.C0 = ls.C0 * CFrame.Angles(0, 0, -0.05)
ls.C0 = ls.C0 * CFrame.Angles(0.1, 0, 0)
wait()
end
for i = 1, 15 do
ls.C0 = ls.C0 * CFrame.Angles(-0.1, 0, 0)
ls.C0 = ls.C0 * CFrame.Angles(0, 0, 0.05)
ls.C0 = ls.C0 * CFrame.Angles(0, -0.1, 0)
rs.C0 = rs.C0 * CFrame.Angles(0, -0.1, 0)
rs.C0 = rs.C0 * CFrame.Angles(0, 0, -0.14)
wait()
end
Workspace.Camera.CoordinateFrame = campos
Workspace.Camera.CameraSubject = camsub
dagger:Destroy()
end

function onClick(plr)
stab(plr)
end

script.Parent.ClickDetector.MouseClick:connect(onClick)
Report Abuse
FreeScriptMaker is not online. FreeScriptMaker
Joined: 29 Nov 2013
Total Posts: 2275
29 Dec 2013 08:41 PM
Is it a localscript?
Report Abuse
awesome404 is not online. awesome404
Joined: 11 Jan 2009
Total Posts: 3601
29 Dec 2013 08:42 PM
no
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image