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 » Scripting Helpers
Home Search
 

Re: How would I make this?

Previous Thread :: Next Thread 
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
07 Jul 2013 10:47 PM
How would I make it to where when someone walks on a certain surface a billboard GUI of dust appears, like if you ran on dirt.
I was thinking if your touching something, and your stance is running then it creates a billboard GUI at your legs.
I don't know how to do this though.
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
08 Jul 2013 01:01 AM
Walking event of Humanoid
Workspace.FindPartOnRay
Instance.new
Smoke/BillboardGuis
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
08 Jul 2013 04:56 AM
but that would make to to where the dust always shows up
Report Abuse
DrWaffler is not online. DrWaffler
Joined: 16 Sep 2011
Total Posts: 4248
08 Jul 2013 08:42 AM
Use the character running event.

game.Workspace.Player.Humanoid.Running:connect(function()

end)
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
08 Jul 2013 01:01 PM
so this:

game.Workspace.Player.Humanoid.Running:connect(function()
Workspace.FindPartOnRay
Instance.new.Smoke
Smoke.name = "dust"
dust.Parent = game.Workspace.Player.Left Leg
script.Parent.dust.color = [48, 48, 48]
Instance.new.Smoke
Smoke.name = "dust2"
dust2.Parent = game.Workspace.Player.Right Leg
script.Parent.dust.color = [48, 48, 48]

end)
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
08 Jul 2013 01:02 PM
which that didn't work.
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
08 Jul 2013 04:14 PM
['Left Leg']
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
08 Jul 2013 04:36 PM
Actually, now that I look again... Have a look at this annotated script.

local part = Instance.new('Part') --Create your part
part.Anchored, part.CanCollide, part.FormFactor, part.Transparency = true, false, 'Custom', 1 --Set your variables.
part.Size = Vector3.new(0.2, 0.2, 0.2) --Set the Size after the FormFactor is changed to prevent errors.
local smoke = Instance.new('Smoke', part) --Create your smoke
smoke.Size = 0.1 --Set the size

game.Players.PlayerAdded:connect(function(player) --get when a player joins

local isWalking --Your variable to tell the script if the player is walking or not
local foot = 0 --A variable to alternate between feet

player.CharacterAdded:connect(function(character) --get when the player respawns.

isWalking = false --You dont spawn walking

character.Humanoid.Running:connect(function(speed) --get when you start/stop walking
if speed > 0 then --Check if walking or stopping.
isWalking = true --Is now walking
while wait(0.2) and isWalking do --Your loop. Note that I have the wait and the variable here. This way, the loop wont crash and will terminate itself when isWalking changes to false again.
foot = foot and 0 or 1 --change feet
local floor, position = workspace:FindPartOnRay(Ray.new(character.Torso.Position, Vector3.new(0, -3.05, 0)), character) --Find the floor part and position of intersection
if floor then --check if floor exists
local p = part:Clone() --clone your part
p.CFrame = CFrame.new(position) * (character.Torso.CFrame - character.Torso.Position) * CFrame.new(0, 0, foot - 0.5) --Set the CFrame after the Size is changed to prevent errors.
p.Smoke.Color = floor.Color --Color your smoke
game:GetService('Debris'):AddItem(p, 0.5) --Destroy the smoke after 0.5 seconds
end
end
else
isWalking = false
end
end)
end)
end)
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
08 Jul 2013 04:40 PM
Annnnd I forget to parent it :P



local part = Instance.new('Part') --Create your part
part.Anchored, part.CanCollide, part.FormFactor, part.Transparency = true, false, 'Custom', 1 --Set your variables.
part.Size = Vector3.new(0.2, 0.2, 0.2) --Set the Size after the FormFactor is changed to prevent errors.
local smoke = Instance.new('Smoke', part) --Create your smoke
smoke.Size = 0.1 --Set the size

game.Players.PlayerAdded:connect(function(player) --get when a player joins

local isWalking --Your variable to tell the script if the player is walking or not
local foot = 0 --A variable to alternate between feet

player.CharacterAdded:connect(function(character) --get when the player respawns.

isWalking = false --You dont spawn walking

character.Humanoid.Running:connect(function(speed) --get when you start/stop walking
if speed > 0 then --Check if walking or stopping.
isWalking = true --Is now walking
while wait(0.2) and isWalking do --Your loop. Note that I have the wait and the variable here. This way, the loop wont crash and will terminate itself when isWalking changes to false again.
foot = foot and 0 or 1 --change feet
local floor, position = workspace:FindPartOnRay(Ray.new(character.Torso.Position, Vector3.new(0, -3.05, 0)), character) --Find the floor part and position of intersection
if floor then --check if floor exists
local p = part:Clone() --clone your part
p.CFrame = CFrame.new(position) * (character.Torso.CFrame - character.Torso.Position) * CFrame.new(0, 0, foot - 0.5) --Set the CFrame after the Size is changed to prevent errors.
p.Smoke.Color = floor.Color --Color your smoke
p.Parent = workspace --Forgot to parent it
game:GetService('Debris'):AddItem(p, 0.5) --Destroy the smoke after 0.5 seconds
end
end
else
isWalking = false
end
end)
end)
end)
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
08 Jul 2013 05:59 PM
Nothing happened.
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
08 Jul 2013 05:59 PM
You might need to change the debris time. Smoke is a bit strange...
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
08 Jul 2013 06:00 PM
What?
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
08 Jul 2013 06:06 PM
Read the script. One of the lines refers to Debris (Its the one that removes the part after a time). Increase said time from 0.5 to 1.5, and it should work fine.
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
08 Jul 2013 06:14 PM
ok
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
08 Jul 2013 06:18 PM
Thanks! just gotta reduce how much shows up.
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
08 Jul 2013 06:18 PM
Change the size of the smoke at the top and adjust the time
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
08 Jul 2013 06:21 PM
I did.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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