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 |
|
|
|
| 08 Jul 2013 01:01 AM |
Walking event of Humanoid Workspace.FindPartOnRay Instance.new Smoke/BillboardGuis |
|
|
| Report Abuse |
|
|
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
|
  |
| 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
|
  |
| 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
|
  |
| Joined: 13 May 2011 |
| Total Posts: 3937 |
|
| |
|
| |
|
|
| 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 |
|
|
|
| 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
|
  |
| Joined: 13 May 2011 |
| Total Posts: 3937 |
|
| |
|
|
| 08 Jul 2013 05:59 PM |
| You might need to change the debris time. Smoke is a bit strange... |
|
|
| Report Abuse |
|
|
drahsid5
|
  |
| Joined: 13 May 2011 |
| Total Posts: 3937 |
|
| |
|
|
| 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
|
  |
| Joined: 13 May 2011 |
| Total Posts: 3937 |
|
| |
|
drahsid5
|
  |
| Joined: 13 May 2011 |
| Total Posts: 3937 |
|
|
| 08 Jul 2013 06:18 PM |
| Thanks! just gotta reduce how much shows up. |
|
|
| Report Abuse |
|
|
|
| 08 Jul 2013 06:18 PM |
| Change the size of the smoke at the top and adjust the time |
|
|
| Report Abuse |
|
|
drahsid5
|
  |
| Joined: 13 May 2011 |
| Total Posts: 3937 |
|
| |
|