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

Brick not moving?

Asked by 9 years ago

Hi, I am trying to create a hopperbin that when G is pressed, creates and slowly moves a brick to the mouse's Hit.X , Y, and Z position. Although, instead of doing what it is supposed to, it moves directly to the Hit position instead of slowly moving as though it is floating. Any solution to this?

The explorer is set up as shows: StarterPack-->HopperBin-->LocalScript

The Code:

01local mouse = game.Players.LocalPlayer:GetMouse()
02 
03function DecimalRound(Number, DecimalPlaces)
04local Int, Dec = math.modf(Number)
05local DecSet = "1"..string.rep("0", DecimalPlaces)
06local ToFakeInt = Dec * tonumber(DecSet)
07local Convertion = math.floor(ToFakeInt)
08local ToRealValue = Convertion / DecSet
09local NewValue = Int + ToRealValue
10return NewValue
11end
12 
13mouse.KeyDown:connect(function(uKey)
14    if uKey == "g" then
15        local x = mouse.Hit.X
View all 95 lines...
0
Someone saw your question as "too broad" and downvoted you. I upvoted just to make up for that - don't worry, you will get an answer. Marios2 360 — 9y
0
Thanks! Again. disassembling 48 — 9y
0
The answer never came. User#11440 120 — 9y

Answer this question