|
| 11 Feb 2016 06:39 AM |
ga me.Work space.Model.C Frame = C Frame.new(-6.8, 12.537, -82)
Note that i had to put the spaces in each word due to roblox not allowing me to post the thread. |
|
|
| Report Abuse |
|
|
|
| 11 Feb 2016 06:41 AM |
Ur doing many things wrong. Use this script
While thruse do,
game.players.playeradded:connect(function(plr) local stats = Instance.new('IntValue', plr) stats.Name = 'leaderstats' local experience = Instance.new('IntValue', stats) experience.Name = 'EXP' experience.Value = 0 local level = Instance.new('IntValue', stats) level.Name = 'Level' level.Value = 0
experience.Changed:Connect(function() level.Value = math.floor(experience.Value / 1000) end) While thruse do local player = game.Players.LocalPlayer local leaderstats = player:WaitForChild('leaderstats') game.players.playeradded:connect(function(plr) local stats = Instance.new('IntValue', plr) stats.Name = 'leaderstats' local experience = Instance.new('IntValue', stats) experience.Name = 'EXP' experience.Value = 0 local level = Instance.new('IntValue', stats) level.Name = 'Level' level.Value = 0
experience.Changed:Connect(function() level.Value = math.floor(experience.Value / 1000) end) While thruse do local player = game.Players.LocalPlayer local leaderstats = player:WaitForChild('leaderstats') game.players.playeradded:connect(function(plr) local stats = Instance.new('IntValue', plr) stats.Name = 'leaderstats' local experience = Instance.new('IntValue', stats) experience.Name = 'EXP' experience.Value = 0 local level = Instance.new('IntValue', stats) level.Name = 'Level' level.Value = 0
experience.Changed:Connect(function() level.Value = math.floor(experience.Value / 1000) end) While thruse do local player = game.Players.LocalPlayer local leaderstats = player:WaitForChild('leaderstats') local level = leaderstats:WaitForChild('Level') local xp = player:WaitForChild('EXP') level.Changed:connect(function() if xp.Value < 1000 then level.Value = 1 end local level = leaderstats:WaitForChild('Level') local xp = player:WaitForChild('EXP') level.Changed:connect(function() if xp.Value < 1000 then level.Value = 1 end local level = leaderstats:WaitForChild('Level') local xp = player:WaitForChild('EXP') level.Changed:connect(function() if xp.Value < 1000 then level.Value = 1 end |
|
|
| Report Abuse |
|
|
|
| 11 Feb 2016 06:44 AM |
| Teleport a MODEL only to the position, not all that. |
|
|
| Report Abuse |
|
|
|
| 11 Feb 2016 06:46 AM |
He's just a spammer, don't mind him.
ga me.Work space.Model:Set Primary Part C CFrame(C Frame.new(-6.8, 12.537, -82))
|
|
|
| Report Abuse |
|
|
|
| 11 Feb 2016 07:15 AM |
Rather than put the model's CFrame, use MoveTo()
game.Workspace.Model:MoveTo(Vector3.new(-6.8, 12.537, -82)) |
|
|
| Report Abuse |
|
|
|
| 11 Feb 2016 08:02 AM |
SetPrimaryPartCFrame is better for pretty nearly everything.
|
|
|
| Report Abuse |
|
|
|
| 11 Feb 2016 08:34 AM |
@cow
It worked! Thank you very much! |
|
|
| Report Abuse |
|
|
|
| 11 Feb 2016 08:44 AM |
Now, i want it after 22 seconds, to appear at the position. How do i do that? I added wait(22) but it doesn't seem to work. |
|
|
| Report Abuse |
|
|
|
| 11 Feb 2016 08:46 AM |
| :MoveTo() uses the middle of the model as it's origin, but SetPrimaryPartCFrame uses the primary part, which isn't always in the middle, therefore making it harder to position it properly. But yes, SetPrimaryPartCFrame is more exact if you need absolute precision. |
|
|
| Report Abuse |
|
|
|
| 11 Feb 2016 09:35 AM |
MoveTo also uses the PrimaryPart, actually. It does not require PrimaryPart though, but it still doesn't move it based on the center.
MoveTo doesn't allow for rotations either. In fact, MoveTo even resets the rotation entirely! If there is anything in the way of the place you are moving the model, it will be moved upwards along the Y axis until there are no obstructions.
|
|
|
| Report Abuse |
|
|
|
| 11 Feb 2016 09:37 AM |
MoveTo moves the model based on the root part. "Since the root part is not deterministic, it is recommended to always set the PrimaryPart first"
|
|
|
| Report Abuse |
|
|
|
| 11 Feb 2016 03:04 PM |
| Yes, I agree that SetPrimaryPart is better, because, obviously, it take the CFrame, which has much more possibilities than Vector3. I just use MoveTo because, as you said, it will move it on the Y axis accordingly if there is something in it's way, and it's the first think I learned so it's a habit. Thanks for all the info on SetPrimaryPartCFrame though :D |
|
|
| Report Abuse |
|
|