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

How Can I Show Cloned Block Position?

Asked by 4 years ago

I want to show a cloned block before placed. How can I fix this script?


--Intilaze Player's Mouse local playerMouse = game.Players.LocalPlayer:GetMouse() local Gridsize = 4 --Tool Equipped script.Parent.Equipped:Connect(function(build) if game.Workspace.GameRunning.Value == true then while script.Parent.Unequipped do local CBlock = game.Workspace.Block:Clone() CBlock.Parent = game.Workspace busy = true repeat wait() CBlock.Position = Vector3.new((math.floor(playerMouse.Hit.X / Gridsize ) * Gridsize),(math.floor(playerMouse.Hit.Y / Gridsize + 0.5) * Gridsize) , (math.floor(playerMouse.Hit.Z / Gridsize ) * Gridsize)) --Mouse Down Event build.Button1Down:Connect(function() CBlock.CFrame = CFrame.new((math.floor(playerMouse.Hit.X / Gridsize ) * Gridsize) , (math.floor(playerMouse.Hit.Y / Gridsize + 0.5) * Gridsize) , (math.floor(playerMouse.Hit.Z / Gridsize ) * Gridsize)) busy = false end) until busy == false end end end)

2 answers

Log in to vote
0
Answered by 4 years ago

You got to better tell us what error messages you are getting. The issue you have(one of them) is that you use cblock.Position instead of cframe.

Ad
Log in to vote
0
Answered by 4 years ago

Actually, My Scipt Working But One At A Time. I want to do is When I Equip Tool, Work Infinitely.

Answer this question