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 » Scripters
Home Search
 

Re: Can not be assigned to? [Part Positions]

Previous Thread :: Next Thread 
reZireZireZi is not online. reZireZireZi
Joined: 26 Jan 2013
Total Posts: 617
15 Jan 2016 09:18 AM
https://gyazo.com/404f01368a74dd3faea3df34af1939af

script:


------------------------------------
modelname="tele2"
------------------------------------

function onTouched(part)
if part.Parent ~= nil then
local h = part.Parent:findFirstChild("Humanoid")
if h~=nil then
local teleportfrom=script.Parent.Enabled.Value
if teleportfrom~=0 then
if h==humanoid then
return
end
local teleportto=script.Parent.Parent:findFirstChild(modelname)
if teleportto~=nil then
local torso = h.Parent.Torso
local location = {teleportto.Position}
local i = 1

local x = location[i].x
local y = location[i].y
local z = location[i].z

x = x + math.random(-1, 1)
z = z + math.random(-1, 1)
y = y + math.random(2, 3)

local cf = torso.CFrame
local lx = 0
local ly = y
local lz = 0

script.Parent.Enabled.Value=0
teleportto.Enabled.Value=0
torso.CFrame = CFrame.new(Vector3.new(x,y,z), Vector3.new(lx,ly,lz))
wait(.5)
script.Parent.Enabled.Value=1
teleportto.Enabled.Value=1

wait (1)
game.Workspace.Background:Stop()
game.Workspace.Alert:Stop()
game.Workspace.Model.Lava.raise.Disabled = true
game.Workspace.Model.Lava.BodyVelocity.Velocity = Vector3.new(0,0,0)
wait (1)
game.Workspace.Model.Lava.Position.Y = 34

else print("Could not find teleporter!")
end
end
end
end
end


script.Parent.Touched:connect(onTouched)
Report Abuse
reZireZireZi is not online. reZireZireZi
Joined: 26 Jan 2013
Total Posts: 617
15 Jan 2016 09:27 AM
bump1
Report Abuse
reZireZireZi is not online. reZireZireZi
Joined: 26 Jan 2013
Total Posts: 617
15 Jan 2016 09:35 AM
bump2 cmooonn
Report Abuse
WoolHat is not online. WoolHat
Joined: 19 May 2013
Total Posts: 1873
15 Jan 2016 09:36 AM
game.Workspace.Model.Lava.Position.Y = 34

Should be

LavaCF = game.Workspace.Model.Lava.CFrame

LavaCF = CFrame.new(LavaCF.X, 34, LavaCF.Z)
Report Abuse
reZireZireZi is not online. reZireZireZi
Joined: 26 Jan 2013
Total Posts: 617
15 Jan 2016 09:42 AM
part called Lava doesn't have any CFrame in it.
Report Abuse
reZireZireZi is not online. reZireZireZi
Joined: 26 Jan 2013
Total Posts: 617
15 Jan 2016 09:50 AM
bump :/
Report Abuse
WoolHat is not online. WoolHat
Joined: 19 May 2013
Total Posts: 1873
15 Jan 2016 09:56 AM
Cframe is a property of a part. Coordinate frame, for positioning.
Report Abuse
AkaLua is not online. AkaLua
Joined: 27 Jul 2012
Total Posts: 526
15 Jan 2016 10:47 AM
'part called Lava doesn't have any CFrame in it.'

Rather than replying with an inept and incoherent response, actually try code given to you by clearly superior individuals. At least try it before going on about something you seem to barley seem to understand.


-____________________________-
Report Abuse
reZireZireZi is not online. reZireZireZi
Joined: 26 Jan 2013
Total Posts: 617
15 Jan 2016 10:57 AM
Found it out and fixed it out by myself, thanks for trying.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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