Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why does the following perform differently in the command bar than it does in a script?

Asked by 7 years ago

Consider the following code:

local p = Instance.new("Part",workspace)
p.Anchored = false
p.CFrame = CFrame.new(5,5,5)

If I run this in the studio command bar, a part is created, moves to 5,5,5, and falls down. I'm still relatively new to CFraming, but this is what one would expect to happen.

Now, if I put that same code in a server script and stick it in ServerScriptStorage, the part moves to 5,5,5, but doesn't fall. I've checked, and it doesn't anchor itself. It's not anchored, not locked, but remains frozen in place (as if it's anchored). I've played around with this a little bit, and determined the scope of the problem: Whenever I edit the CFrame of a part from a script, the object permanently acts as if it's anchored even when it's not.

I have uninstalled and completely reinstalled Roblox Studio, which didn't help. I have also tried using a different RBXL file, and publishing the code to roblox and entering with the play button. Since the problem persists in play mode even though major games can CFrame just fine, this suggests that my code is wrong. But, the fact that I get the expected result from the command bar suggests that Roblox is screwing up. I honestly have no idea what to do at this point.

What am I doing wrong?

0
I noticed this too. I think it's simply a studio bug. cabbler 1942 — 7y
0
It's a studio bug; its happened to me as well, especially w/ the Body objects (BodyForce, etc.) TheeDeathCaster 2368 — 7y
0
ServerScriptStorage? User#5423 17 — 7y
0
So if it's a studio bug, who do I report it to? When can I expect it to be fixed, or is CFraming now depreciated? Macelarius 15 — 7y
0
CFraming isn't deprecated, and you have to wait 'til R decides to do anything. :/ TheeDeathCaster 2368 — 7y

Answer this question