instawin
|
  |
| Joined: 04 Jun 2013 |
| Total Posts: 8777 |
|
|
| 02 Feb 2015 09:26 AM |
so I made a hopperbin that makes your character transparent, and floaty
however, once the character turns back to normal from his transparency, his torso is like blue and stuff, why is that? is there any other way to prevent that?
also, for the floaty part, i used a body velocity and i put it inside of the character's torso. any other way to get that same floaty effect as well? the function that handles transparency is the spookify function, and the function that handles floating is inside of the jumping function
preferably i only wanted their jumps to be floaty but yeah
here's the script
bin = script.Parent -- the hopperbin itself event = bin:WaitForChild("RemoteEvent") delayTime = 5
local function spookify(player, transparency) local char = player.Character local humanoid = char:FindFirstChild("Humanoid") if char and humanoid and humanoid.Health > 0 then for i, v in pairs (char:GetChildren()) do if v:IsA("Part") then v.Transparency = transparency end end end end
local function jumping(player) local char = player.Character local humanoid = char:FindFirstChild("Humanoid") if char and humanoid and humanoid.Health > 0 then --does floaty stuff there bodyvel = Instance.new("BodyVelocity") bodyvel.Parent = char:FindFirstChild("Torso") bodyvel.velocity = Vector3.new(0,4,0) bodyvel.maxForce = Vector3.new(0,10000,0)
local spookysound = Instance.new("Sound") spookysound.Parent = char:FindFirstChild("Torso") spookysound.SoundId = "rbxasset://sounds/HalloweenGhost.wav" spookysound.Pitch = 1 spookysound.Volume = 0.7 spookysound.PlayOnRemove = true spookysound:Destroy() end end
local function unspookify(player, transparency) local char = player.Character local humanoid = char:FindFirstChild("Humanoid") if char and humanoid and humanoid.Health > 0 then for i, v in pairs(char:GetChildren())do if v:IsA("Part") then v.Transparency = transparency bodyvel:Destroy() end end end end
bin.Selected:connect(function() event.OnServerEvent:connect(function(player, ...) if player then local tuple = {...} if tuple[2] == "KeyPressed" then local keyPressed = tuple[3] if keyPressed == "g" then print("spookifying") wait() spookify(player, 0.5) jumping(player) wait(delayTime) unspookify(player, 0 end end end end) end)
|
|
|
| Report Abuse |
|
instawin
|
  |
| Joined: 04 Jun 2013 |
| Total Posts: 8777 |
|
|
| 02 Feb 2015 09:29 AM |
*unspookify(player, 0)
whoops, accidentally deleted that extra ) when deleting a comment |
|
|
| Report Abuse |
|