generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

please help...

Previous Thread :: Next Thread 
sentry3 is not online. sentry3
Joined: 01 May 2010
Total Posts: 538
01 Jul 2016 04:01 PM
local cost = 10 -- cost of supply
local plr = game.Players.LocalPlayer
local item = plr:WaitForChild("Wood")
local storage = game:GetService("ReplicatedStorage") --storage
local mouse = plr:GetMouse()

script.Parent.MouseButton1Click:connect(function(buy)
local crafteditem = storage.Supplies:WaitForChild("Hut1"):clone() -- Item to buy
if item then
wait(1)
if item.Value >= cost then
if plr.PlayerGui.ihave.Frame.Crafting.Visible == true then
plr.PlayerGui.ihave.Frame.Crafting.Visible = false
end
mouse.TargetFilter = crafteditem
item.Value = item.Value - cost
crafteditem.Parent = workspace
for i,v in pairs (crafteditem:GetChildren()) do
v.Transparency = .5
v.CanCollide = false
end
repeat
wait()
crafteditem:SetPrimaryPartCFrame(CFrame.new(mouse.hit.p))
until mouse.Button1Down
if mouse.Button1Down then
local copy = storage.Supplies.Hut1:clone()
copy.Parent = workspace
copy:SetPrimaryPartCFrame(CFrame.new(mouse.hit.p))
crafteditem:destroy()
end
end
end
end)


--The problem is is that its not waiting until the mouse button is clicke it just does it instantly after buying, its not letting the player place it.. .what do i do?
Report Abuse
sentry3 is not online. sentry3
Joined: 01 May 2010
Total Posts: 538
01 Jul 2016 04:22 PM
b
Report Abuse
sentry3 is not online. sentry3
Joined: 01 May 2010
Total Posts: 538
01 Jul 2016 04:43 PM
comeon
Report Abuse
sentry3 is not online. sentry3
Joined: 01 May 2010
Total Posts: 538
01 Jul 2016 09:10 PM
its been 4 hours...
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image