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

Help with making this place block script work correctly?

Asked by 7 years ago
Edited 7 years ago

I am trying to make this script place a block, but when I hit the correct button, nothing happens (Yes selected has a value, game.Lighting.1) Here is the script:

01--LocalScript
02local player = game.Players.LocalPlayer
03local Mouse = player:GetMouse()
04local Placing = false
05local Already = false
06function Place()
07    local Xpos = Mouse.Target.Position.X
08    local Ypos = Mouse.Target.Position.Y
09    local Zpos = Mouse.Target.Position.Z
10    local Surface = Mouse.TargetSurface
11    local TargetPos = Mouse.Target.Position
12    local Selected = game.Players.LocalPlayer.Selected.Value
13    local Clone = Selected:Clone()
14    Clone.Position = Vector3.new(TargetPos)
15    if Surface == 1 then
View all 62 lines...
0
You have to clone on the server for it to replicate! Remember to use Remotes Goulstem 8144 — 7y
0
What? This does not have FilteringEnabled. TinyScripter 70 — 7y
0
I do not condone, nor suggest, non-FE game development. But also it seems like you never parented the clone. Goulstem 8144 — 7y
0
Oh. Thanks for that! I keep forgetting! TinyScripter 70 — 7y
View all comments (3 more)
0
Nevermind, still nothing happens. TinyScripter 70 — 7y
0
You put Clone.Parent = game.Workspace and nothing happens? (also a tip: you dont need to put else all those times. you can either make them all seperate if statements and remove all the elses which are currently serving no purpose, or you can combine them to "elseif" and only use one end) UnityAlex 36 — 7y
0
I tryed that and it still wont work TinyScripter 70 — 7y

Answer this question