#Rainbow Flick System Problem
1 messages · Page 1 of 1 (latest)
local Script: ```lua
local UIS = game:GetService("UserInputService")
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
local Anim = Humanoid:LoadAnimation(script.RainbowFlickAnim)
local Cooldown = false
UIS.InputBegan:Connect(function(input, GPE)
if GPE then return end
if input.KeyCode == Enum.KeyCode.Space then
if Character:FindFirstChild("RealFootball") and not Cooldown then
Cooldown = true
Anim:Play()
game.ReplicatedStorage.RemoteEvents.RainbowFlickEvent:FireServer()
task.spawn(function()
task.wait(2)
Cooldown = false
end)
end
end
end)
Server Script: ```lua
game.ReplicatedStorage.RemoteEvents.RainbowFlickEvent.OnServerEvent:Connect(function(Player)
local Character = Player.Character
local HRP = Character:WaitForChild("HumanoidRootPart")
local Ball = Character:WaitForChild("RealFootball")
if Ball:IsA("BasePart") then
local BallPlayer = Ball:WaitForChild("BallPlayer")
BallPlayer.Value = false
Ball.M6:Destroy()
Ball.Position = HRP.Position + (HRP.CFrame.LookVector * -2)
Ball.Velocity += Vector3.new(0, 100, 0)
Ball.CanCollide = true
Ball.Parent = game.Workspace
Ball.CanTouch = false
task.spawn(function()
task.wait(1)
Ball.CanTouch = true
end)
end
end)
to
Ball.Velocity = Ball.Velocity + Vector3.new(0, 100, 0)
and run it
and let me know
ServerScript
@modern stratus
Do this
For me it looks like collison
U can't really expect to not have problems with applied forces when it collides with something in its way
@modern stratus My suggestion is simple
isn't the ball need to touch the ground?
When u turn it off ball will obivously fall to the void
yes
But the collision is the reason why it works that way. Lemme finish what i want to suggest 😭
Yes
ok nvm
Just use collision groups for a person that has permissions over the ball
Possesion
And what if there will be an obstacle like a wall?
Just set collision group for the ball and person that is in possesion and turn it off for them
Do u know how collision groups work?
get my full Roblox Studio course here (50% OFF):
https://linktr.ee/ByteBlox
photos of my pet pigeons: https://www.instagram.com/subnautica_man
discord: https://discord.gg/ay5gc9XcAh
wondered how to make a main menu in roblox studio? or how to create a shop which has working GUI? ive made lots of 2024 roblox scripting tutorials about all the d...
Np
I can explain to you what u have to do
But dunno if my theory is right tho